Skip to content

Add support for latest AI models (Claude 4.6, GPT-5.3, Gemini 3.1, Qwen3.5) - #747

Merged
2witstudios merged 13 commits into
masterfrom
claude/add-gpt-5.3-model-rINy9
Mar 8, 2026
Merged

2witstudios merged 13 commits into
masterfrom
claude/add-gpt-5.3-model-rINy9

Conversation

@2witstudios

@2witstudios 2witstudios commented Mar 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add new model support across Anthropic, Google, OpenAI, and OpenRouter providers, plus integration system enhancements.

AI Models

  • Anthropic: Claude Sonnet 4.6
  • Google: Gemini 3.1 Pro Preview, Gemini 3.1 Pro Preview Custom Tools, Gemini 3.1 Flash Lite Preview
  • OpenAI: GPT-5.3 Chat, GPT-5.3 Codex, GPT-5.4, GPT-5.4 Pro
  • Qwen (OpenRouter): Qwen3.5 family (397B-A17B, Plus, Flash, 122B, 35B, 27B), Qwen3 Max Thinking
  • Other: Mercury 2

Integrations

  • Slack and Notion built-in provider adapters with OAuth2, rate limiting, and tool definitions
  • Agent integrations panel: tool-level access control (allowedTools UI)
  • Integration audit log page with filtering, pagination, and CSV export
  • Response validation pipeline for integration tool execution
  • Default headers merging in tool execution saga

Infrastructure

  • MCP auth scope enforcement for tasks and channels routes
  • Dashboard layout route pattern fix for workflows
  • Vision model registry refactored to strip provider prefixes (eliminates duplicate entries)
  • Audit log stats memoized in single pass; redundant filter state removed

How to Validate

  1. Check model selectors in AI chat — new models should appear for each provider
  2. Navigate to drive integrations settings — Slack and Notion providers available
  3. Agent integrations panel shows tool access badges with remove capability
  4. Integration audit log page filters, paginates, and exports CSV correctly
  5. MCP-scoped tokens properly restricted on task and channel routes

claude added 9 commits March 5, 2026 03:13
Add gpt-5.3-chat-latest (released March 3, 2026) to the OpenAI direct
provider and OpenRouter paid provider, with vision capability entries.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add gemini-3.1-flash-lite-preview (released Mar 3, 2026) with 1M context
window to Google direct and OpenRouter providers, with vision capability.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
…iders

Add gemini-3.1-pro-preview-customtools (released Feb 25, 2026) with 1M
context window to Google direct and OpenRouter providers, with vision.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add openai/gpt-5.3-codex (released Feb 24, 2026, 400K context) to the
OpenRouter paid provider with vision capability entry.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add gemini-3.1-pro-preview (released Feb 19, 2026) with 1M context
window to Google direct and OpenRouter providers, with vision capability.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add claude-sonnet-4-6-20260217 (released Feb 17, 2026) with 1M context
to Anthropic direct and OpenRouter providers, with vision capability.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add four Qwen3.5 native vision-language models (released Feb 25, 2026):
- qwen3.5-flash (1M context)
- qwen3.5-122b-a10b (262K context)
- qwen3.5-35b-a3b (262K context)
- qwen3.5-27b (262K context)

All are vision-capable models with hybrid linear attention + MoE architecture.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add two more Qwen3.5 native vision-language models (released Feb 16, 2026):
- qwen3.5-397b-a17b (262K context, flagship model)
- qwen3.5-plus-2026-02-15 (1M context)

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
Add qwen/qwen3-max-thinking (released Feb 9, 2026, 262K context),
the flagship reasoning model in the Qwen3 series.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH
@coderabbitai

coderabbitai Bot commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@2witstudios has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 80f0c6b7-01e9-467b-9a48-57fda0a0f621

📥 Commits

Reviewing files that changed from the base of the PR and between 74386f8 and 31a602c.

📒 Files selected for processing (4)
  • apps/web/src/app/api/pages/[pageId]/tasks/__tests__/route.test.ts
  • apps/web/src/components/integrations/IntegrationAuditLogPage.tsx
  • apps/web/src/lib/ai/core/ai-providers-config.ts
  • apps/web/src/lib/ai/core/vision-models.ts
📝 Walkthrough

Walkthrough

Added many new model entries (GPT‑5.4/5.3, Claude Sonnet 4.6, Gemini 3.1 variants, Qwen3.5 family, Mercury 2) across AI provider registries and extended the vision-capable models registry; also adjusted IntegrationAuditLogPage stats/export logic and its test.

Changes

Cohort / File(s) Summary
AI Provider Configuration
apps/web/src/lib/ai/core/ai-providers-config.ts
Bulk additions of new model entries across providers (OpenRouter, OpenAI, Google, Anthropic, Inception) including GPT‑5.4/5.3 variants, Claude Sonnet 4.6, Gemini 3.1 previews/custom tools/flash, Qwen3.5 family, and Mercury 2. Confirm identifier naming and provider mapping alignment.
Vision Capabilities Registry
apps/web/src/lib/ai/core/vision-models.ts
Expanded VISION_CAPABLE_MODELS with many new model identifiers (GPT‑5.4/5.3, Claude 4.6, Gemini 3.1 variants, Qwen3.5 vision models, Grok, glm, minimax updates). Added provider-prefix stripping helper and updated hasVisionCapability to support prefixed/unprefixed IDs.
Integration Audit UI & Tests
apps/web/src/components/integrations/IntegrationAuditLogPage.tsx, apps/web/src/components/integrations/__tests__/IntegrationAuditLogPage.test.tsx
Refactored per-page stats computation to single-pass memo, switched export URL construction to use hookParams, removed DOM append/remove for CSV anchor, updated dependencies and UI text ("(this page)"); updated test expectation to match UI text change.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I hopped through configs, nibbling names anew,
Claude and Gemini, Qwen in a crew.
Vision flags glitter like carrots bright,
I thumped my foot — the models feel right.
A tiny hop for code, a joyful chew.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main objective: adding support for the latest AI models (Claude 4.6, GPT-5.3, Gemini 3.1, Qwen3.5). The changes across all four modified files directly align with this purpose.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/add-gpt-5.3-model-rINy9

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 and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd6c37d717

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +99 to +103
// Qwen3.5 Vision-Language Models
'qwen/qwen3.5-397b-a17b': true,
'qwen/qwen3.5-plus-2026-02-15': true,
'qwen/qwen3.5-flash': true,
'qwen/qwen3.5-122b-a10b': true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add qwen3-max-thinking to vision model map

This Qwen vision-model block omits qwen/qwen3-max-thinking, even though that model was newly added in ai-providers-config.ts alongside the other Qwen3.5 entries; because hasVisionCapability() does not have a Qwen heuristic fallback, this ID will be treated as non-vision at runtime and image input/features will be disabled for users selecting it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 54ac5f9 — added qwen3-max-thinking to the vision model registry. With the prefix-stripping refactor, both qwen/qwen3-max-thinking and bare qwen3-max-thinking are now resolved correctly.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/lib/ai/core/vision-models.ts`:
- Around line 99-106: VISION_CAPABLE_MODELS is missing the
'qwen/qwen3-max-thinking' entry, causing hasVisionCapability fallback to
mis-classify that model as non-vision-capable; add 'qwen/qwen3-max-thinking':
true to the VISION_CAPABLE_MODELS map/constant (the same structure that contains
other qwen/* entries) so the model is recognized by hasVisionCapability and
image requests are not blocked.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85457d9e-cb61-44e8-9ece-d67f66b3f343

📥 Commits

Reviewing files that changed from the base of the PR and between b592511 and bd6c37d.

📒 Files selected for processing (2)
  • apps/web/src/lib/ai/core/ai-providers-config.ts
  • apps/web/src/lib/ai/core/vision-models.ts

Comment thread apps/web/src/lib/ai/core/vision-models.ts
- GPT-5.4: OpenAI's latest frontier model, 1M+ context, vision support
- GPT-5.4 Pro: Enhanced reasoning variant for complex tasks, vision support
- Mercury 2: Inception's reasoning diffusion LLM, 128K context, >1000 tok/s

All released March 4-5, 2026.

https://claude.ai/code/session_013JAWABx5QQCSth4ApeU6dH

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
apps/web/src/lib/ai/core/ai-providers-config.ts (1)

63-76: ⚠️ Potential issue | 🟠 Major

These new third-party models still bypass the current subscription gate.

The provided apps/web/src/app/api/ai/chat/route.ts snippet shows chat requests only consulting requiresProSubscription(...), and the accompanying context says that helper returns false for non-PageSpace providers. Adding more Claude/GPT/Gemini/Qwen/Mercury entries here therefore expands the set of premium models users can hit without any entitlement check.

Also applies to: 113-119, 133-135, 152-152, 216-218, 239-240, 288-288

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/lib/ai/core/ai-providers-config.ts` around lines 63 - 76,
Third-party model entries added to ai-providers-config.ts are currently
bypassing the subscription gate because requiresProSubscription(...) (used in
apps/web/src/app/api/ai/chat/route.ts) returns false for non-PageSpace
providers; fix by either adding an explicit premium flag to the provider
configuration in ai-providers-config.ts (e.g., requiresPro: true for entries
like 'anthropic/claude-sonnet-4.6', 'openai/gpt-5.4', etc.) and updating the
chat route to consult that flag, or modify the requiresProSubscription function
to treat non-PageSpace namespaces (anthropic/, openai/, gemini/, qwen/,
mercury/, etc.) as requiring pro access; update the chat route to call the new
logic (requiresProSubscription) so these new keys are correctly gated.
♻️ Duplicate comments (1)
apps/web/src/lib/ai/core/vision-models.ts (1)

105-111: ⚠️ Potential issue | 🟠 Major

Add qwen/qwen3-max-thinking to the vision allowlist.

apps/web/src/lib/ai/core/ai-providers-config.ts now exposes qwen/qwen3-max-thinking at Line 119, but hasVisionCapability() has no Qwen fallback. Without a static entry here, that model resolves to false and image requests get blocked.

Suggested fix
   'qwen/qwen3.5-flash': true,
   'qwen/qwen3.5-122b-a10b': true,
   'qwen/qwen3.5-35b-a3b': true,
   'qwen/qwen3.5-27b': true,
+  'qwen/qwen3-max-thinking': true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/lib/ai/core/vision-models.ts` around lines 105 - 111, The vision
allowlist in apps/web/src/lib/ai/core/vision-models.ts is missing the Qwen
fallback entry so hasVisionCapability() will treat qwen/qwen3-max-thinking as
unsupported; add the key 'qwen/qwen3-max-thinking': true to the exported
allowlist object (alongside other 'qwen/...' entries such as
'qwen/qwen3.5-397b-a17b') so that the model exposed in ai-providers-config.ts is
recognized and image requests are allowed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/lib/ai/core/ai-providers-config.ts`:
- Around line 239-240: The AI_PROVIDERS.openai.models registry is missing
GPT-5.4 entries so isValidModel('openai', ...) and the UI selector reject
gpt-5.4 identifiers; update the AI_PROVIDERS.openai.models object to include
mappings for 'gpt-5.4' (friendly name e.g., 'GPT-5.4') and 'gpt-5.4-pro' (e.g.,
'GPT-5.4 Pro') matching the keys used in vision-models.ts so the direct OpenAI
provider recognizes these models.

---

Outside diff comments:
In `@apps/web/src/lib/ai/core/ai-providers-config.ts`:
- Around line 63-76: Third-party model entries added to ai-providers-config.ts
are currently bypassing the subscription gate because
requiresProSubscription(...) (used in apps/web/src/app/api/ai/chat/route.ts)
returns false for non-PageSpace providers; fix by either adding an explicit
premium flag to the provider configuration in ai-providers-config.ts (e.g.,
requiresPro: true for entries like 'anthropic/claude-sonnet-4.6',
'openai/gpt-5.4', etc.) and updating the chat route to consult that flag, or
modify the requiresProSubscription function to treat non-PageSpace namespaces
(anthropic/, openai/, gemini/, qwen/, mercury/, etc.) as requiring pro access;
update the chat route to call the new logic (requiresProSubscription) so these
new keys are correctly gated.

---

Duplicate comments:
In `@apps/web/src/lib/ai/core/vision-models.ts`:
- Around line 105-111: The vision allowlist in
apps/web/src/lib/ai/core/vision-models.ts is missing the Qwen fallback entry so
hasVisionCapability() will treat qwen/qwen3-max-thinking as unsupported; add the
key 'qwen/qwen3-max-thinking': true to the exported allowlist object (alongside
other 'qwen/...' entries such as 'qwen/qwen3.5-397b-a17b') so that the model
exposed in ai-providers-config.ts is recognized and image requests are allowed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 183d6092-16d9-4835-b65a-7766db9d995f

📥 Commits

Reviewing files that changed from the base of the PR and between bd6c37d and 8daeeec.

📒 Files selected for processing (2)
  • apps/web/src/lib/ai/core/ai-providers-config.ts
  • apps/web/src/lib/ai/core/vision-models.ts

Comment thread apps/web/src/lib/ai/core/ai-providers-config.ts
- Fix misleading stats labels: clarify success rate and avg duration are
  computed from the current page only, not the full dataset
- Remove duplicate filter-to-params logic in handleExport by reusing
  hookParams
- Compute stats in a single pass with useMemo instead of separate
  filter+reduce calls
- Remove unnecessary DOM append/remove for CSV download element
- Tighten FiltersState.success type from string to union literal
- Deduplicate vision-models.ts: replace ~30 provider-prefixed entries
  with a stripPrefix helper in hasVisionCapability lookup

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
apps/web/src/components/integrations/IntegrationAuditLogPage.tsx (1)

282-287: ⚠️ Potential issue | 🟡 Minor

Type mismatch in Select onValueChange handler.

The onValueChange callback receives value: string from the Select component, but filters.success is typed as 'all' | 'true' | 'false'. The assignment success: value should use a type assertion to maintain type safety.

Proposed fix
             <Select
               value={filters.success}
               onValueChange={(value) => {
-                setFilters((prev) => ({ ...prev, success: value }));
+                setFilters((prev) => ({ ...prev, success: value as 'all' | 'true' | 'false' }));
                 setCurrentPage(1);
               }}
             >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/integrations/IntegrationAuditLogPage.tsx` around
lines 282 - 287, In IntegrationAuditLogPage, the Select onValueChange handler
assigns a string to filters.success which is typed as the union 'all' | 'true' |
'false'; fix this by using a TypeScript type assertion when updating filters
(cast the incoming value to the 'all' | 'true' | 'false' union) so the
setFilters call remains type-safe, and keep the setCurrentPage(1) call as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/lib/ai/core/vision-models.ts`:
- Around line 74-79: The vision-capable registry is missing the 'grok-4-fast'
entry causing hasVisionCapability to return false for that model; update the
registry object in apps/web/src/lib/ai/core/vision-models.ts (the map that
currently includes 'grok-4', 'grok-2-vision', etc.) to include 'grok-4-fast':
true so hasVisionCapability (the function that checks for both "grok" and
"vision" substrings) will correctly recognize it as vision-capable.

---

Outside diff comments:
In `@apps/web/src/components/integrations/IntegrationAuditLogPage.tsx`:
- Around line 282-287: In IntegrationAuditLogPage, the Select onValueChange
handler assigns a string to filters.success which is typed as the union 'all' |
'true' | 'false'; fix this by using a TypeScript type assertion when updating
filters (cast the incoming value to the 'all' | 'true' | 'false' union) so the
setFilters call remains type-safe, and keep the setCurrentPage(1) call as-is.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 20fa6543-04da-420b-bb69-d27dce83bc77

📥 Commits

Reviewing files that changed from the base of the PR and between 8daeeec and 74386f8.

📒 Files selected for processing (3)
  • apps/web/src/components/integrations/IntegrationAuditLogPage.tsx
  • apps/web/src/components/integrations/__tests__/IntegrationAuditLogPage.test.tsx
  • apps/web/src/lib/ai/core/vision-models.ts

Comment thread apps/web/src/lib/ai/core/vision-models.ts
- Add qwen3-max-thinking to vision model registry (Codex + CodeRabbit)
- Add grok-4-fast to vision model registry (CodeRabbit)
- Add GPT-5.4/5.4 Pro to direct OpenAI provider (CodeRabbit)
- Fix TypeScript error: cast Select onValueChange to FiltersState union
The tasks route now imports checkMCPPageScope from @/lib/auth,
so the existing mock needs to include it to avoid vitest errors.
@2witstudios
2witstudios merged commit b704a06 into master Mar 8, 2026
4 of 5 checks passed
@2witstudios
2witstudios deleted the claude/add-gpt-5.3-model-rINy9 branch March 11, 2026 03:11
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.

2 participants