Skip to content

feat(vercel): use -non-reasoning suffix for Grok 4.x when reasoning is disabled#2577

Open
kilo-code-bot[bot] wants to merge 4 commits intomainfrom
feat/grok4-non-reasoning-vercel-suffix
Open

feat(vercel): use -non-reasoning suffix for Grok 4.x when reasoning is disabled#2577
kilo-code-bot[bot] wants to merge 4 commits intomainfrom
feat/grok4-non-reasoning-vercel-suffix

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Apr 18, 2026

Summary

  • When a Grok 4.x model (e.g. x-ai/grok-4-fast, x-ai/grok-4.1-fast, x-ai/grok-4.20-beta) is routed to Vercel and reasoning is explicitly disabled, the Vercel model ID now uses the -non-reasoning suffix instead of -reasoning.
  • mapModelIdToVercel accepts a new optional reasoningDisabled parameter (defaults to false); when true and the hardcoded Vercel ID ends with -reasoning, the suffix is replaced with -non-reasoning.
  • Both call sites in vercel/index.ts (shouldRouteToVercel and applyVercelSettings) pass isReasoningExplicitlyDisabled(request) to keep routing checks and model name in sync.

Verification

  • TypeScript environment not fully available locally (missing tsgo/jest binaries); relying on CI.

Visual Changes

N/A

Reviewer Notes

  • The change is additive: non-Grok models and Grok models without reasoning disabled are unaffected.
  • isReasoningExplicitlyDisabled already handles all three request kinds (chat_completions, messages, responses).

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 18, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.ts

Reviewed by gpt-5.4-20260305 · 118,833 tokens

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