Skip to content

feat(ai): upgrade Claude, GPT, and Gemini models - #850

Merged
urjitc merged 2 commits into
ThinkEx-OSS:mainfrom
mahruschow:fix/claude-sonnet-5-5
Oct 7, 2026
Merged

urjitc merged 2 commits into
ThinkEx-OSS:mainfrom
mahruschow:fix/claude-sonnet-5-5

Conversation

@mahruschow

@mahruschow mahruschow commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

ThinkEx was still using older GPT and Gemini models alongside Sonnet 5. This updates the existing model lineup and its fallback routes to the current corresponding models. The original Sonnet 5.5 contribution by @mahruschow is preserved as its own commit; the remaining upgrades are a maintainer follow-up.

Changes

  • Claude Sonnet 5.5, GPT-6.1 Sol in place of Terra, GPT-6 Luna including Auto, and Gemini 3.8 Flash for chat and compaction.
  • Gemini 3.5 Flash-Lite for chat titles, Gemini 3.8 Flash for image extraction, and Luna 6 for the title fallback.
  • Supported thinking settings: low for Sol and Flash 3.8, minimal for Flash-Lite titles. Refresh OpenAI context limits, relative cost estimates, and model picker references.
  • Keep Haiku 4.5, Gemini 3.1 Pro Preview, billing tiers, priority service, provider ordering, and prompts unchanged.

Testing

  • CI passed full formatting, lint, TypeScript, all 454 tests across 106 files, and the staging build. React Doctor passed.
  • 25 tests passed across AI access policy, chat context, compaction, and worker observability.
  • All seven primary/fallback model IDs are present in the live Vercel AI Gateway catalog.
  • git diff --check passed.
  • Live generation/tool probes could not run because the local Infisical login expired. Provider access and actual failover remain unverified.

Review notes

  • Sol 6.1 requires reasoning; its minimum supported effort is low. Gateway handles the provider API transport.
  • Gemini 3.8 Flash requires at least low thinking. Google lists its current pricing as introductory through December 31, 2026.
  • Internal gpt-terra selections are replaced by gpt-sol, following the repo's greenfield policy; an old selection resolves through the existing Auto fallback.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c4740bc-50de-4ce4-8228-820bb876d2d9
📥 Commits

Reviewing files that changed from the base of the PR and between f96318c and 7c75ee5.

📒 Files selected for processing (4)
  • src/features/workspaces/ai/ai-gateway-routing.ts
  • src/features/workspaces/ai/chat/chat-telemetry.ts
  • src/features/workspaces/ai/models.ts
  • src/integrations/posthog/ai-observability.worker.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Claude Sonnet model name and gateway identifier now use version 5.5. The fallback lists, telemetry example, routing comment, and fallback test were updated to reflect the change.

Changes

Sonnet model update

Layer / File(s) Summary
Update Sonnet model references
src/features/workspaces/ai/ai-gateway-routing.ts, src/features/workspaces/ai/models.ts, src/features/workspaces/ai/chat/chat-telemetry.ts, src/integrations/posthog/ai-observability.worker.test.ts
The model catalog and fallback lists now use anthropic/claude-sonnet-5.5. The routing comment, telemetry example, and fallback test reference the updated model.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: urjitc

Merge Risk: ⚪ Minimal · up to 7c75e

The updated Sonnet selection and fallbacks use a model identifier listed by the gateway; no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the Claude Sonnet upgrade and relates to the GPT and Gemini fallback changes, but it may imply that those models were also upgraded.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/features/workspaces/ai/ai-gateway-routing.ts">

<violation number="1" location="src/features/workspaces/ai/ai-gateway-routing.ts:46">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**

This routing change is not covered by a test: the updated observability fixture uses hand-built metadata and never calls `getWorkspaceAiGatewayRoutingOptions`. Add a regression assertion for the `gpt-terra` and `gemini-pro` fallback model lists.</violation>
</file>

<file name="src/features/workspaces/ai/models.ts">

<violation number="1" location="src/features/workspaces/ai/models.ts:56">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**

Add a regression test for the changed `claude-sonnet` mapping. The observability fixture uses the new slug, but no test verifies that `getWorkspaceAiChatModel("claude-sonnet")` returns `"anthropic/claude-sonnet-5.5"`.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

"gpt-terra": {
order: ["openai", "azure"],
models: ["anthropic/claude-sonnet-5", "google/gemini-3.1-pro-preview"],
models: ["anthropic/claude-sonnet-5.5", "google/gemini-3.1-pro-preview"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Custom agent: Flag AI Slop and Fabricated Changes

This routing change is not covered by a test: the updated observability fixture uses hand-built metadata and never calls getWorkspaceAiGatewayRoutingOptions. Add a regression assertion for the gpt-terra and gemini-pro fallback model lists.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/features/workspaces/ai/ai-gateway-routing.ts, line 46:

<comment>This routing change is not covered by a test: the updated observability fixture uses hand-built metadata and never calls `getWorkspaceAiGatewayRoutingOptions`. Add a regression assertion for the `gpt-terra` and `gemini-pro` fallback model lists.</comment>

<file context>
@@ -43,15 +43,15 @@ const workspaceAiGatewayRouting: Record<WorkspaceAiChatModelId, GatewayRoutingOp
 	"gpt-terra": {
 		order: ["openai", "azure"],
-		models: ["anthropic/claude-sonnet-5", "google/gemini-3.1-pro-preview"],
+		models: ["anthropic/claude-sonnet-5.5", "google/gemini-3.1-pro-preview"],
 	},
 	"gpt-luna": {
</file context>

name: "Claude Sonnet 5",
gatewayModel: "anthropic/claude-sonnet-5",
name: "Claude Sonnet 5.5",
gatewayModel: "anthropic/claude-sonnet-5.5",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Custom agent: Flag AI Slop and Fabricated Changes

Add a regression test for the changed claude-sonnet mapping. The observability fixture uses the new slug, but no test verifies that getWorkspaceAiChatModel("claude-sonnet") returns "anthropic/claude-sonnet-5.5".

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/features/workspaces/ai/models.ts, line 56:

<comment>Add a regression test for the changed `claude-sonnet` mapping. The observability fixture uses the new slug, but no test verifies that `getWorkspaceAiChatModel("claude-sonnet")` returns `"anthropic/claude-sonnet-5.5"`.</comment>

<file context>
@@ -52,8 +52,8 @@ export const WORKSPACE_AI_CHAT_MODELS = [
-		name: "Claude Sonnet 5",
-		gatewayModel: "anthropic/claude-sonnet-5",
+		name: "Claude Sonnet 5.5",
+		gatewayModel: "anthropic/claude-sonnet-5.5",
 		provider: "anthropic",
 		tagline: "Thoughtful and polished",
</file context>

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Updates AI model version strings across the system.

No blocking issue was established; the review supports merging.

What we checked:

  • Ran a credential-free check comparing the before-change Sonnet 5 and after-change Sonnet 5.5 routing and model code. T-Rex
  • Verified that the gateway catalog and provider endpoints returned HTTP 200 for both Sonnet IDs, with the after-change entry listing an Anthropic provider endpoint, and that requests carried the expected primary model IDs and fallbacks for Sonnet, GPT Terra, and Gemini Pro. T-Rex
  • Observed unauthenticated generation requests returned HTTP 401 in both runs, and noted that authorized generation and actual failover were not exercised. T-Rex

Summary

The PR updates the Claude Sonnet picker and gateway model to Sonnet 5.5, updates two cross-model fallback routes, and aligns a telemetry example and observability fixture. The new model ID is listed in the gateway catalog, and captured requests carry the intended model and routing options. No actionable issue was established.

Reviews (1) · Last reviewed commit: "fix(ai): upgrade Claude Sonnet to 5.5"

@urjitc urjitc changed the title fix(ai): upgrade Claude Sonnet to 5.5 feat(ai): upgrade Claude, GPT, and Gemini models Oct 7, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 7 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/features/workspaces/ai/gateway.ts">

<violation number="1" location="src/features/workspaces/ai/gateway.ts:136">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**

This model/provider behavior change has no regression assertions. Add tests that verify the `gpt-sol` reasoning option and title model's `minimal` thinking configuration.</violation>
</file>

<file name="src/features/workspaces/extraction/providers/gemini-image-markdown.ts">

<violation number="1" location="src/features/workspaces/extraction/providers/gemini-image-markdown.ts:16">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**

This model and thinking-config change alters the image-extraction request, but no test exercises `createGeminiImageMarkdownProvider` or asserts those fields. Add a focused regression test that mocks `generateText` and verifies the model and provider options.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

openai: {
reasoningEffort: "none",
// Sol 6.1 requires reasoning; low is its minimum supported effort.
reasoningEffort: "low",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Custom agent: Flag AI Slop and Fabricated Changes

This model/provider behavior change has no regression assertions. Add tests that verify the gpt-sol reasoning option and title model's minimal thinking configuration.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/features/workspaces/ai/gateway.ts, line 136:

<comment>This model/provider behavior change has no regression assertions. Add tests that verify the `gpt-sol` reasoning option and title model's `minimal` thinking configuration.</comment>

<file context>
@@ -129,10 +129,11 @@ function getWorkspaceAiReasoningOptions(
 				openai: {
-					reasoningEffort: "none",
+					// Sol 6.1 requires reasoning; low is its minimum supported effort.
+					reasoningEffort: "low",
 				},
 			};
</file context>

} from "#/features/workspaces/extraction/types";

const IMAGE_EXTRACTION_GATEWAY_MODEL = "google/gemini-2.5-flash";
const IMAGE_EXTRACTION_GATEWAY_MODEL = "google/gemini-3.8-flash";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Custom agent: Flag AI Slop and Fabricated Changes

This model and thinking-config change alters the image-extraction request, but no test exercises createGeminiImageMarkdownProvider or asserts those fields. Add a focused regression test that mocks generateText and verifies the model and provider options.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/features/workspaces/extraction/providers/gemini-image-markdown.ts, line 16:

<comment>This model and thinking-config change alters the image-extraction request, but no test exercises `createGeminiImageMarkdownProvider` or asserts those fields. Add a focused regression test that mocks `generateText` and verifies the model and provider options.</comment>

<file context>
@@ -13,7 +13,7 @@ import type {
 } from "#/features/workspaces/extraction/types";
 
-const IMAGE_EXTRACTION_GATEWAY_MODEL = "google/gemini-2.5-flash";
+const IMAGE_EXTRACTION_GATEWAY_MODEL = "google/gemini-3.8-flash";
 const jpegMediaType = "image/jpeg";
 
</file context>

@urjitc
urjitc merged commit 29cdda4 into ThinkEx-OSS:main Oct 7, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants