feat(model): support GPT-5.6 effort levels - #1913
Conversation
📝 WalkthroughWalkthroughThe PR updates AI SDK dependencies, ACP registry release metadata, model capability definitions, legacy reasoning-effort imports, and tests for model metadata and OpenAI responses serialization. ChangesModel and reasoning support
Runtime dependency updates
ACP registry releases
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
resources/model-db/providers.json (1)
244923-244948: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant
effort/verbosityin bothreasoningandextra_capabilities.reasoning.These image-generation models now have
effort: "medium"andverbosity: "medium"in the top-levelreasoningobject (lines 244924–244925, 244999–245000, 245074–245075) and the same values inextra_capabilities.reasoning. If the top-level fields are legacy andextra_capabilities.reasoningis the new canonical source, the duplication may cause confusion about which one drives behavior. Consider removing the top-leveleffort/verbosityif they are no longer read by the application.Also applies to: 244998-245023, 245073-245098
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@resources/model-db/providers.json` around lines 244923 - 244948, Remove the redundant top-level effort and verbosity fields from the reasoning objects for the affected image-generation model entries, retaining the canonical values under extra_capabilities.reasoning. Update all three corresponding entries consistently and preserve their existing effort and verbosity options.src/main/presenter/agentSessionPresenter/legacyImportService.ts (1)
425-430: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
isVerbosityfor consistency with theisReasoningEffortrefactor.The verbosity validation still uses manual triple
pickStringcalls with an unsafeascast, whilereasoningEffortwas just refactored to use the centralizedisVerbositypredicate from the same module. This eliminates redundant calls, removes the type assertion, and stays future-proof against schema changes.♻️ Proposed refactor
// line 12 -import { isReasoningEffort } from '`@shared/types/model-db`' +import { isReasoningEffort, isVerbosity } from '`@shared/types/model-db`'if (!this.sqlitePresenter.deepchatSessionsTable.get(sessionId)) { const reasoningEffort = this.pickString(conversation, ['reasoning_effort']) + const verbosity = this.pickString(conversation, ['verbosity']) this.sqlitePresenter.deepchatSessionsTable.create( sessionId, providerId, modelId, 'full_access', { systemPrompt: this.pickString(conversation, ['system_prompt']) ?? undefined, temperature: this.pickNumber(conversation, ['temperature']) ?? undefined, contextLength: this.pickNumber(conversation, ['context_length']) ?? undefined, maxTokens: this.pickNumber(conversation, ['max_tokens']) ?? undefined, thinkingBudget: this.pickNumber(conversation, ['thinking_budget']) ?? undefined, reasoningEffort: isReasoningEffort(reasoningEffort) ? reasoningEffort : undefined, - verbosity: - this.pickString(conversation, ['verbosity']) === 'low' || - this.pickString(conversation, ['verbosity']) === 'medium' || - this.pickString(conversation, ['verbosity']) === 'high' - ? (this.pickString(conversation, ['verbosity']) as 'low' | 'medium' | 'high') - : undefined + verbosity: isVerbosity(verbosity) ? verbosity : undefined, } ) }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/presenter/agentSessionPresenter/legacyImportService.ts` around lines 425 - 430, Update the verbosity mapping in the legacy import conversion to use the centralized isVerbosity predicate, matching the reasoningEffort refactor. Store the picked verbosity value once, validate it with isVerbosity, and return it directly when valid instead of repeating pickString calls and using an unsafe type assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@resources/model-db/providers.json`:
- Around line 257998-258117: Update the temperature capability for the
openai/gpt-5.6-sol model entry to false, matching the corresponding GPT-5.6
provider entry and reasoning-model behavior. Locate the entry by its id
"openai/gpt-5.6-sol" and change only its temperature field.
- Around line 218357-218454: Correct the alternate gpt-5.6-luna and
gpt-5.6-terra entries to match the canonical GPT-5.6 definitions: use
proper-cased names and display names, set limit.output to 128000, add
modalities.output with ["text"], add temperature: false, and add
cost.cache_write: 3.125. Apply these changes consistently to both model objects.
---
Nitpick comments:
In `@resources/model-db/providers.json`:
- Around line 244923-244948: Remove the redundant top-level effort and verbosity
fields from the reasoning objects for the affected image-generation model
entries, retaining the canonical values under extra_capabilities.reasoning.
Update all three corresponding entries consistently and preserve their existing
effort and verbosity options.
In `@src/main/presenter/agentSessionPresenter/legacyImportService.ts`:
- Around line 425-430: Update the verbosity mapping in the legacy import
conversion to use the centralized isVerbosity predicate, matching the
reasoningEffort refactor. Store the picked verbosity value once, validate it
with isVerbosity, and return it directly when valid instead of repeating
pickString calls and using an unsafe type assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d693ea0f-4505-49ce-af13-becf9d372ba1
📒 Files selected for processing (7)
package.jsonresources/acp-registry/registry.jsonresources/model-db/providers.jsonsrc/main/presenter/agentSessionPresenter/legacyImportService.tstest/main/presenter/agentSessionPresenter/legacyImportService.test.tstest/main/presenter/llmProviderPresenter/openAIResponsesEffort.test.tstest/main/shared/modelDb.test.ts
| { | ||
| "id": "gpt-5.6-luna", | ||
| "name": "gpt-5.6-luna", | ||
| "display_name": "gpt-5.6-luna", | ||
| "modalities": { | ||
| "input": [ | ||
| "text", | ||
| "image" | ||
| ] | ||
| }, | ||
| "limit": { | ||
| "context": 1050000, | ||
| "output": 1050000 | ||
| }, | ||
| "tool_call": true, | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default": true | ||
| }, | ||
| "extra_capabilities": { | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default_enabled": true, | ||
| "mode": "effort", | ||
| "effort": "medium", | ||
| "effort_options": [ | ||
| "none", | ||
| "low", | ||
| "medium", | ||
| "high", | ||
| "xhigh", | ||
| "max" | ||
| ], | ||
| "verbosity": "medium", | ||
| "verbosity_options": [ | ||
| "low", | ||
| "medium", | ||
| "high" | ||
| ], | ||
| "visibility": "hidden" | ||
| } | ||
| }, | ||
| "cost": { | ||
| "input": 1, | ||
| "output": 6, | ||
| "cache_read": 0.1 | ||
| }, | ||
| "type": "chat" | ||
| }, | ||
| { | ||
| "id": "gpt-5.6-terra", | ||
| "name": "gpt-5.6-terra", | ||
| "display_name": "gpt-5.6-terra", | ||
| "modalities": { | ||
| "input": [ | ||
| "text", | ||
| "image" | ||
| ] | ||
| }, | ||
| "limit": { | ||
| "context": 1050000, | ||
| "output": 1050000 | ||
| }, | ||
| "tool_call": true, | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default": true | ||
| }, | ||
| "extra_capabilities": { | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default_enabled": true, | ||
| "mode": "effort", | ||
| "effort": "medium", | ||
| "effort_options": [ | ||
| "none", | ||
| "low", | ||
| "medium", | ||
| "high", | ||
| "xhigh", | ||
| "max" | ||
| ], | ||
| "verbosity": "medium", | ||
| "verbosity_options": [ | ||
| "low", | ||
| "medium", | ||
| "high" | ||
| ], | ||
| "visibility": "hidden" | ||
| } | ||
| }, | ||
| "cost": { | ||
| "input": 2.5, | ||
| "output": 15, | ||
| "cache_read": 0.25 | ||
| }, | ||
| "type": "chat" | ||
| }, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Multiple data integrity issues in the alternate gpt-5.6-luna and gpt-5.6-terra entries.
These entries differ significantly from the same models in hunk 13 (lines 217680–217858) and the OpenAI namespaced entries in hunk 41 (lines 257998–258117):
limit.output: 1050000— equals the context limit, which is almost certainly a copy-paste error. All other GPT-5.6 entries use128000.- Missing
outputarray inmodalities— onlyinputis present. All other GPT-5.6 entries include"output": ["text"]. - Missing
cache_writeincost— present in hunks 13 and 41 for the same models. - Missing
temperaturefield — hunk 13 setstemperature: false; hunk 41 setstemperature: true. Its absence here leaves the value undefined. - Lowercase
name/display_name(gpt-5.6-luna) vs proper case (GPT-5.6 Luna) in hunk 13 — inconsistent display naming for the same model.
🔧 Proposed fixes
{
"id": "gpt-5.6-luna",
- "name": "gpt-5.6-luna",
- "display_name": "gpt-5.6-luna",
+ "name": "GPT-5.6 Luna",
+ "display_name": "GPT-5.6 Luna",
"modalities": {
"input": [
"text",
"image"
- ]
+ ],
+ "output": [
+ "text"
+ ]
},
+ "temperature": false,
"limit": {
"context": 1050000,
- "output": 1050000
+ "output": 128000
},
"tool_call": true,
"reasoning": {
"supported": true,
"default": true
},
"extra_capabilities": {
"reasoning": {
...
}
},
"cost": {
"input": 1,
"output": 6,
- "cache_read": 0.1
+ "cache_read": 0.1,
+ "cache_write": 1.25
},
"type": "chat"
},Apply the same fixes to gpt-5.6-terra (set output: 128000, add output modalities, add temperature: false, add cache_write: 3.125, fix name casing).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "id": "gpt-5.6-luna", | |
| "name": "gpt-5.6-luna", | |
| "display_name": "gpt-5.6-luna", | |
| "modalities": { | |
| "input": [ | |
| "text", | |
| "image" | |
| ] | |
| }, | |
| "limit": { | |
| "context": 1050000, | |
| "output": 1050000 | |
| }, | |
| "tool_call": true, | |
| "reasoning": { | |
| "supported": true, | |
| "default": true | |
| }, | |
| "extra_capabilities": { | |
| "reasoning": { | |
| "supported": true, | |
| "default_enabled": true, | |
| "mode": "effort", | |
| "effort": "medium", | |
| "effort_options": [ | |
| "none", | |
| "low", | |
| "medium", | |
| "high", | |
| "xhigh", | |
| "max" | |
| ], | |
| "verbosity": "medium", | |
| "verbosity_options": [ | |
| "low", | |
| "medium", | |
| "high" | |
| ], | |
| "visibility": "hidden" | |
| } | |
| }, | |
| "cost": { | |
| "input": 1, | |
| "output": 6, | |
| "cache_read": 0.1 | |
| }, | |
| "type": "chat" | |
| }, | |
| { | |
| "id": "gpt-5.6-terra", | |
| "name": "gpt-5.6-terra", | |
| "display_name": "gpt-5.6-terra", | |
| "modalities": { | |
| "input": [ | |
| "text", | |
| "image" | |
| ] | |
| }, | |
| "limit": { | |
| "context": 1050000, | |
| "output": 1050000 | |
| }, | |
| "tool_call": true, | |
| "reasoning": { | |
| "supported": true, | |
| "default": true | |
| }, | |
| "extra_capabilities": { | |
| "reasoning": { | |
| "supported": true, | |
| "default_enabled": true, | |
| "mode": "effort", | |
| "effort": "medium", | |
| "effort_options": [ | |
| "none", | |
| "low", | |
| "medium", | |
| "high", | |
| "xhigh", | |
| "max" | |
| ], | |
| "verbosity": "medium", | |
| "verbosity_options": [ | |
| "low", | |
| "medium", | |
| "high" | |
| ], | |
| "visibility": "hidden" | |
| } | |
| }, | |
| "cost": { | |
| "input": 2.5, | |
| "output": 15, | |
| "cache_read": 0.25 | |
| }, | |
| "type": "chat" | |
| }, | |
| { | |
| "id": "gpt-5.6-luna", | |
| "name": "GPT-5.6 Luna", | |
| "display_name": "GPT-5.6 Luna", | |
| "modalities": { | |
| "input": [ | |
| "text", | |
| "image" | |
| ], | |
| "output": [ | |
| "text" | |
| ] | |
| }, | |
| "temperature": false, | |
| "limit": { | |
| "context": 1050000, | |
| "output": 128000 | |
| }, | |
| "tool_call": true, | |
| "reasoning": { | |
| "supported": true, | |
| "default": true | |
| }, | |
| "extra_capabilities": { | |
| "reasoning": { | |
| "supported": true, | |
| "default_enabled": true, | |
| "mode": "effort", | |
| "effort": "medium", | |
| "effort_options": [ | |
| "none", | |
| "low", | |
| "medium", | |
| "high", | |
| "xhigh", | |
| "max" | |
| ], | |
| "verbosity": "medium", | |
| "verbosity_options": [ | |
| "low", | |
| "medium", | |
| "high" | |
| ], | |
| "visibility": "hidden" | |
| } | |
| }, | |
| "cost": { | |
| "input": 1, | |
| "output": 6, | |
| "cache_read": 0.1, | |
| "cache_write": 1.25 | |
| }, | |
| "type": "chat" | |
| }, | |
| { | |
| "id": "gpt-5.6-terra", | |
| "name": "GPT-5.6 Terra", | |
| "display_name": "GPT-5.6 Terra", | |
| "modalities": { | |
| "input": [ | |
| "text", | |
| "image" | |
| ], | |
| "output": [ | |
| "text" | |
| ] | |
| }, | |
| "temperature": false, | |
| "limit": { | |
| "context": 1050000, | |
| "output": 128000 | |
| }, | |
| "tool_call": true, | |
| "reasoning": { | |
| "supported": true, | |
| "default": true | |
| }, | |
| "extra_capabilities": { | |
| "reasoning": { | |
| "supported": true, | |
| "default_enabled": true, | |
| "mode": "effort", | |
| "effort": "medium", | |
| "effort_options": [ | |
| "none", | |
| "low", | |
| "medium", | |
| "high", | |
| "xhigh", | |
| "max" | |
| ], | |
| "verbosity": "medium", | |
| "verbosity_options": [ | |
| "low", | |
| "medium", | |
| "high" | |
| ], | |
| "visibility": "hidden" | |
| } | |
| }, | |
| "cost": { | |
| "input": 2.5, | |
| "output": 15, | |
| "cache_read": 0.25, | |
| "cache_write": 3.125 | |
| }, | |
| "type": "chat" | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@resources/model-db/providers.json` around lines 218357 - 218454, Correct the
alternate gpt-5.6-luna and gpt-5.6-terra entries to match the canonical GPT-5.6
definitions: use proper-cased names and display names, set limit.output to
128000, add modalities.output with ["text"], add temperature: false, and add
cost.cache_write: 3.125. Apply these changes consistently to both model objects.
| { | ||
| "id": "openai/gpt-5.6-luna", | ||
| "name": "OpenAI: GPT-5.6 Luna", | ||
| "display_name": "OpenAI: GPT-5.6 Luna", | ||
| "modalities": { | ||
| "input": [ | ||
| "text", | ||
| "image", | ||
| "pdf" | ||
| ], | ||
| "output": [ | ||
| "text" | ||
| ] | ||
| }, | ||
| "limit": { | ||
| "context": 1050000, | ||
| "output": 128000 | ||
| }, | ||
| "temperature": true, | ||
| "tool_call": true, | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default": true | ||
| }, | ||
| "extra_capabilities": { | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default_enabled": true, | ||
| "mode": "effort", | ||
| "effort": "medium", | ||
| "effort_options": [ | ||
| "none", | ||
| "low", | ||
| "medium", | ||
| "high", | ||
| "xhigh", | ||
| "max" | ||
| ], | ||
| "verbosity": "medium", | ||
| "verbosity_options": [ | ||
| "low", | ||
| "medium", | ||
| "high" | ||
| ], | ||
| "visibility": "hidden" | ||
| } | ||
| }, | ||
| "attachment": true, | ||
| "open_weights": false, | ||
| "knowledge": "2026-02-16", | ||
| "release_date": "2026-07-09", | ||
| "last_updated": "2026-07-09", | ||
| "cost": { | ||
| "input": 1, | ||
| "output": 6, | ||
| "cache_read": 0.1, | ||
| "cache_write": 1.25 | ||
| }, | ||
| "type": "chat" | ||
| }, | ||
| { | ||
| "id": "openai/gpt-5.6-sol", | ||
| "name": "OpenAI: GPT-5.6 Sol", | ||
| "display_name": "OpenAI: GPT-5.6 Sol", | ||
| "modalities": { | ||
| "input": [ | ||
| "text", | ||
| "image", | ||
| "pdf" | ||
| ], | ||
| "output": [ | ||
| "text" | ||
| ] | ||
| }, | ||
| "limit": { | ||
| "context": 1050000, | ||
| "output": 128000 | ||
| }, | ||
| "temperature": true, | ||
| "tool_call": true, | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default": true | ||
| }, | ||
| "extra_capabilities": { | ||
| "reasoning": { | ||
| "supported": true, | ||
| "default_enabled": true, | ||
| "mode": "effort", | ||
| "effort": "medium", | ||
| "effort_options": [ | ||
| "none", | ||
| "low", | ||
| "medium", | ||
| "high", | ||
| "xhigh", | ||
| "max" | ||
| ], | ||
| "verbosity": "medium", | ||
| "verbosity_options": [ | ||
| "low", | ||
| "medium", | ||
| "high" | ||
| ], | ||
| "visibility": "hidden" | ||
| } | ||
| }, | ||
| "attachment": true, | ||
| "open_weights": false, | ||
| "knowledge": "2026-02-16", | ||
| "release_date": "2026-07-09", | ||
| "last_updated": "2026-07-09", | ||
| "cost": { | ||
| "input": 5, | ||
| "output": 30, | ||
| "cache_read": 0.5, | ||
| "cache_write": 6.25 | ||
| }, | ||
| "type": "chat" | ||
| }, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
temperature: true contradicts temperature: false for the same models in hunk 13.
The OpenAI namespaced entries openai/gpt-5.6-luna (line 258016) and openai/gpt-5.6-sol (line 258076) set temperature: true, while the same models at lines 217698 and 217758 set temperature: false. GPT-5.6 is a reasoning model family where temperature control is typically disabled. This inconsistency could cause incorrect API behavior — one provider path would send temperature parameters while the other wouldn't.
🔧 Proposed fix
{
"id": "openai/gpt-5.6-luna",
...
- "temperature": true,
+ "temperature": false,
"tool_call": true,Apply the same change to openai/gpt-5.6-sol.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@resources/model-db/providers.json` around lines 257998 - 258117, Update the
temperature capability for the openai/gpt-5.6-sol model entry to false, matching
the corresponding GPT-5.6 provider entry and reasoning-model behavior. Locate
the entry by its id "openai/gpt-5.6-sol" and change only its temperature field.
Summary by CodeRabbit
New Features
Bug Fixes