Migrate OpenAI to Responses API + reasoning + images#1250
Merged
Conversation
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
…-1112 # Conflicts: # CHANGELOG.md
…igh for non-curated models
…t and log dropped reasoning items
…, reasoning Codable round-trip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.openAIprovider now usesPOST /v1/responsesvia newOpenAIResponsesProvider. OpenRouter/Ollama/Custom keep Chat Completions via existingOpenAICompatibleProvider.DisclosureGroup, "Reasoning…" while streaming, 80ms debounce on delta text). Surfaced for OpenAI reasoning models (gpt-5.5, gpt-5-codex, gpt-5.3-codex, gpt-5.4-mini) and Claude extended thinking (Opus 4.7, Sonnet 4.6, Haiku 4.5).~/Library/Caches/com.TablePro/AIChatImages/<uuid>.<ext>; wire holds filename + media type only.descriptor.supportsReasoningand the model'ssupportedEffortLevels. OpenAI:minimal/low/medium/high/xhigh. Claude:low/medium/high/xhighmapped to adaptive effort orbudget_tokenson pre-adaptive models.max_output_tokensauto-scales per effort level sobudget_tokens < max_tokensholds for Anthropic.ChatToolSchemaBuilder.objectemitsadditionalProperties: false, auto-includes all property keys inrequired, supports nullable unions for optional fields. All 8 existing tools migrated.ReasoningOpaque(itemID, value, blockType)— server-issuedrs_*ID flows back into the nextinputarray, no synthetic ID collisions. Required for Responses tool-loop correctness (server rejectsfunction_call_outputwithout its precedingreasoningitem).Picker.menu) with Curated / Fetched / Other sections plus free-text fallback.Test plan
xcodebuild ... build)swiftlint lint --strict)gpt-5.5+ reasoning medium → Reasoning panel expands while streaming, collapses on done, encrypted reasoning item round-trips through tool loops without 400 errorChatTurnhistoryexecute_querytool still parses correctly after strict schema migration (optional fields sent asnullor omitted)