Skip to content

Expose hard-coded request fields through builder API and fix JSON null serialization #38

Description

@luckenco

Problem

Several request fields are hard-coded and not exposed through the builder, with some being serialized as JSON nulls.

Current Issues

  • Hard-coded fields: instructions, user, max_tool_calls, store, truncation
  • JSON null serialization: Fields not set are being serialized as null instead of omitted
  • Missing builder API: No way to configure these important request parameters

Specific Locations

  • src/responses/request.rs:18
  • src/responses/request.rs:25
  • src/responses/request.rs:48

Requirements

  • Expose all hard-coded fields through the builder API
  • Fix JSON serialization to omit unset fields (not send null)
  • Add proper validation for new builder methods
  • Maintain backward compatibility where possible
  • Update documentation for new builder options

Impact

Users cannot configure important request parameters, and the API sends unnecessary null values in requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeston-holdCurrently blocked or on waiting on another feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions