fix(ai): handle same-provider different-model handoff in OpenAI Responses API
When switching between OpenAI models (e.g., gpt-5-mini to gpt-5.2-codex), function_call IDs with fc_ prefix trigger pairing validation errors because OpenAI tracks which fc_xxx IDs were paired with rs_xxx reasoning items. The fix omits the id field for function_calls from different models, which avoids the pairing validation while keeping call_id for matching with function_call_output. Fixes #886
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
- Added `headers` option to `StreamOptions` for custom HTTP headers in API requests. Supported by all providers except Amazon Bedrock (which uses AWS SDK auth). Headers are merged with provider defaults and `model.headers`, with `options.headers` taking precedence.
|
||||
- Added `originator` option to `loginOpenAICodex()` for custom OAuth client identification
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed OpenAI Responses API 400 error "function_call without required reasoning item" when switching between models (same provider, different model). The fix omits the `id` field for function_calls from different models to avoid triggering OpenAI's reasoning/function_call pairing validation ([#886](https://github.com/badlogic/pi-mono/issues/886))
|
||||
|
||||
## [0.49.2] - 2026-01-19
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user