Skip to content

omarluq/gpt-5.6#195

Merged
omarluq merged 3 commits into
mainfrom
omarluq/gpt-5.6
Jul 10, 2026
Merged

omarluq/gpt-5.6#195
omarluq merged 3 commits into
mainfrom
omarluq/gpt-5.6

Conversation

@omarluq

@omarluq omarluq commented Jul 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

GPT-5.6 Sol, Terra, and Luna models were added to discovery and built-in provider catalogs, with updated costs, context limits, defaults, reasoning mappings, payload handling, terminal cycling, and test coverage.

Changes

GPT-5.6 model support

Layer / File(s) Summary
Static and discovered model catalogs
internal/model/discovery.go, internal/model/discovery*_test.go
OpenAI Responses and Codex static catalogs now include GPT-5.6 variants, costs, metadata, filtering, and reasoning-level mappings.
Built-in provider models and defaults
internal/model/providers.go, internal/model/providers_test.go, internal/config/loader.go, config.example.yaml, internal/model/types.go
OpenAI-family defaults switch to gpt-5.6-sol, provider metadata uses model definitions, and ThinkingMax is added.
Thinking-max propagation
internal/provider/client.go, internal/provider/*responses*_test.go, internal/provider/*chat*_test.go, internal/terminal/session_settings_actions.go, internal/terminal/render_composer.go
Max reasoning is mapped into provider payloads, included in thinking-level cycling, and rendered with accent styling.
Test validation updates
internal/model/*_test.go, internal/provider/*_test.go, internal/terminal/*_test.go
Tests use typed boolean helpers, testify assertions, and deterministic asynchronous waits.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Poem

A bunny found new models bright,
Sol and Luna hopped in sight.
Terra brought a thinking tune,
Max now dances past the moon.
Tests stand proud in tidy rows—
“GPT-5.6,” the rabbit knows!

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so the change cannot be meaningfully summarized. Add a brief description of the GPT-5.6 model, provider, and test updates.
Title check ❓ Inconclusive The title is related to the change, but it reads like a branch name and does not clearly describe the update. Rename it to a concise summary of the main change, e.g. "Add GPT-5.6 model support".
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch omarluq/gpt-5.6

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.88716% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.59%. Comparing base (97b5ff0) to head (0d9aa99).

Files with missing lines Patch % Lines
internal/model/discovery.go 96.29% 3 Missing and 3 partials ⚠️
internal/terminal/render_composer.go 0.00% 1 Missing ⚠️
internal/terminal/session_settings_actions.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #195      +/-   ##
==========================================
+ Coverage   83.51%   83.59%   +0.08%     
==========================================
  Files         287      287              
  Lines       23204    23363     +159     
==========================================
+ Hits        19379    19531     +152     
- Misses       2658     2662       +4     
- Partials     1167     1170       +3     
Flag Coverage Δ
unittests 83.59% <96.88%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/terminal/session_settings_actions.go (1)

85-94: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Gate ThinkingMax in the thinking cycle. cycleThinking() always includes ThinkingMax, but some models never map that level. On those models, reasoningEffort() falls back to the raw "max" string, so a user can end up sending an unsupported reasoning_effort value.

🤖 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 `@internal/terminal/session_settings_actions.go` around lines 85 - 94, The
cycleThinking method must not always expose ThinkingMax because some models do
not support it. Gate the ThinkingMax entry using the model’s supported
thinking-level capability, ensuring unsupported models cycle only through valid
levels and never produce a raw "max" reasoning_effort value.
🧹 Nitpick comments (3)
internal/provider/openai_chat_payload_internal_test.go (1)

30-66: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

"max maps directly" doesn't test the direct/fallback path.

Both subtests call setTestThinkingMap, so reasoningEffort always takes the mapped branch (payload builder conditionally sets payload["reasoning_effort"] using reasoningEffort(request), which maps request thinking level through request.Model.ThinkingLevelMap (or falls back to the raw thinking level) when reasoning is enabled). Since mappedLevel == level == thinkingMax for the "max maps directly" case, this doesn't actually verify the no-map-entry fallback that most GPT-5.6 models will use for a level with no explicit map entry.

♻️ Suggested addition to cover the fallback path
 		{
 			name:        "max maps directly",
 			level:       thinkingMax,
 			mappedLevel: thinkingMax,
 			want:        thinkingMax,
 		},
+		{
+			name:  "max falls back without a map entry",
+			level: thinkingMax,
+			want:  thinkingMax,
+		},

Then skip setTestThinkingMap when mappedLevel == "" in the loop.

🤖 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 `@internal/provider/openai_chat_payload_internal_test.go` around lines 30 - 66,
Update TestOpenAIChatPayloadMapsReasoningEffort so the direct/fallback case
omits the thinking-level map entry: only call setTestThinkingMap when
mappedLevel is non-empty, and add a max case with an empty mappedLevel whose
expected value remains thinkingMax. Keep the existing mapped xhigh case to
verify explicit mapping.
internal/model/providers_test.go (1)

139-159: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider a struct-literal table instead of an 8-parameter constructor.

gpt56BuiltInTestCase takes 8 positional parameters (5 consecutive strings), which SonarCloud flags and which risks silent parameter-order mistakes in test data. Building gpt56BuiltInTest{...} literals directly with named fields in gpt56BuiltInTests() would remove the constructor and the ordering risk.

🤖 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 `@internal/model/providers_test.go` around lines 139 - 159, Replace the
eight-parameter gpt56BuiltInTestCase constructor with direct gpt56BuiltInTest
struct literals in gpt56BuiltInTests(), using named fields for every value.
Remove the helper and update all call sites to eliminate positional string
parameters and ordering risks.

Source: Linters/SAST tools

internal/model/discovery.go (1)

297-309: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract a shared constant for the repeated "gpt-5.6" literal.

"gpt-5.6" is hardcoded three times (Line 307, Line 658, Line 662). SonarCloud flags this as a duplicated literal; a shared constant would also protect against typos across the three call sites.

♻️ Proposed fix
+const gpt56Generic = "gpt-5.6"
+
 func openAIUnsupportedDiscoveredModel(provider, fallbackModelID string, definition *discoveryModel) bool {
 	if provider != providerOpenAI {
 		return false
 	}

 	modelID := fallbackModelID
 	if definition.ID != "" {
 		modelID = definition.ID
 	}

-	return modelID == "gpt-5.6"
+	return modelID == gpt56Generic
 }
 func openAISupportsXHigh(modelID string) bool {
 	return strings.Contains(modelID, gpt52) ||
 		strings.Contains(modelID, "gpt-5.3") ||
 		strings.Contains(modelID, "gpt-5.4") ||
 		strings.Contains(modelID, gpt55) ||
-		strings.Contains(modelID, "gpt-5.6")
+		strings.Contains(modelID, gpt56Generic)
 }

 func openAISupportsMax(modelID string) bool {
-	return strings.Contains(modelID, "gpt-5.6")
+	return strings.Contains(modelID, gpt56Generic)
 }

Also applies to: 653-666

🤖 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 `@internal/model/discovery.go` around lines 297 - 309, Extract a shared
constant for the repeated "gpt-5.6" model identifier, placing it near the other
model constants in internal/model/discovery.go. Update
openAIUnsupportedDiscoveredModel and the related call sites around the model
handling logic to reference this constant instead of hardcoding the literal.

Source: Linters/SAST tools

🤖 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.

Outside diff comments:
In `@internal/terminal/session_settings_actions.go`:
- Around line 85-94: The cycleThinking method must not always expose ThinkingMax
because some models do not support it. Gate the ThinkingMax entry using the
model’s supported thinking-level capability, ensuring unsupported models cycle
only through valid levels and never produce a raw "max" reasoning_effort value.

---

Nitpick comments:
In `@internal/model/discovery.go`:
- Around line 297-309: Extract a shared constant for the repeated "gpt-5.6"
model identifier, placing it near the other model constants in
internal/model/discovery.go. Update openAIUnsupportedDiscoveredModel and the
related call sites around the model handling logic to reference this constant
instead of hardcoding the literal.

In `@internal/model/providers_test.go`:
- Around line 139-159: Replace the eight-parameter gpt56BuiltInTestCase
constructor with direct gpt56BuiltInTest struct literals in gpt56BuiltInTests(),
using named fields for every value. Remove the helper and update all call sites
to eliminate positional string parameters and ordering risks.

In `@internal/provider/openai_chat_payload_internal_test.go`:
- Around line 30-66: Update TestOpenAIChatPayloadMapsReasoningEffort so the
direct/fallback case omits the thinking-level map entry: only call
setTestThinkingMap when mappedLevel is non-empty, and add a max case with an
empty mappedLevel whose expected value remains thinkingMax. Keep the existing
mapped xhigh case to verify explicit mapping.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 73c28c0f-be1b-48b2-9ce6-e3a9e8e334e6

📥 Commits

Reviewing files that changed from the base of the PR and between 97b5ff0 and 82e1d5e.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (23)
  • config.example.yaml
  • internal/config/loader.go
  • internal/model/discovery.go
  • internal/model/discovery_behavior_internal_test.go
  • internal/model/discovery_internal_test.go
  • internal/model/providers.go
  • internal/model/providers_test.go
  • internal/model/types.go
  • internal/provider/anthropic_tools_internal_test.go
  • internal/provider/client.go
  • internal/provider/errors_internal_test.go
  • internal/provider/openai_chat_payload_internal_test.go
  • internal/provider/openai_responses_internal_test.go
  • internal/provider/request_shape_internal_test.go
  • internal/provider/test_helpers_internal_test.go
  • internal/provider/tool_loop_internal_test.go
  • internal/terminal/async_events_internal_test.go
  • internal/terminal/compact_commands_internal_test.go
  • internal/terminal/prompt_response_internal_test.go
  • internal/terminal/prompt_send_internal_test.go
  • internal/terminal/render_composer.go
  • internal/terminal/session_setting_actions_internal_test.go
  • internal/terminal/session_settings_actions.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

@omarluq omarluq merged commit 0055e18 into main Jul 10, 2026
16 of 19 checks passed
@omarluq omarluq deleted the omarluq/gpt-5.6 branch July 10, 2026 22:00
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