Repository navigation
Commit 233cf27
committed
fix(provider): omit reasoning id when store is false for third-party API compatibility
When using third-party OpenAI-compatible APIs with store: false, the
reasoning object should not include the id field. Third-party APIs don't
support OpenAI's item_reference mechanism, causing 'Item with id rs_...
not found' errors on subsequent requests.
This fix:
- Makes the id field optional in OpenAIResponsesReasoning type
- Omits the id field when store is false in convertToOpenAIResponsesInput
Fixes anomalyco#2941, anomalyco#4426, anomalyco#44451 parent 94dca30 commit 233cf27
2 files changed
Lines changed: 3 additions & 2 deletions
File tree
- packages/opencode/src/provider/sdk/openai-compatible/src/responses
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | | - | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments