Skip to content

Conversation

@LimChihi
Copy link
Contributor

@LimChihi LimChihi commented Nov 21, 2025

What

  • Threaded an optional vendorParameters argument through all chat entry points (sync, async, Combine, streaming) and wrapped streaming bodies as needed.
  • Documented usage with a some provider “thinking” example and added regression tests (plus request-capturing tweaks to the mock session) to ensure the extra JSON lands correctly.

Why

Some OpenAI-compatible providers (e.g., Volcengine’s DeepSeek) require custom top-level fields such as thinking.type. The SDK previously ignored any unsupported keys, forcing consumers to fork the models. This change gives developers a standard way to supply provider-specific knobs while keeping the official schema intact.

Affected Areas

  • Public chat APIs (OpenAIProtocol, OpenAIAsync, OpenAICombine) and their concrete implementations.
  • Request-building internals for chat calls (OpenAI.swift, OpenAI+MakeRequest.swift) plus the new helper types.
  • Documentation and tests covering chat usage.

@LimChihi LimChihi force-pushed the feature/vendor-parameters branch from 757c1cf to 8a66d08 Compare November 21, 2025 18:05
@LimChihi LimChihi force-pushed the feature/vendor-parameters branch from 8a66d08 to 5b35af9 Compare November 21, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant