Skip to content

fix(ai-gateway): expand fallback model variants - #5059

Merged
chrarnoldus merged 3 commits into
mainfrom
update-getfallbackmodelvariants-fallbacks
Aug 5, 2026
Merged

fix(ai-gateway): expand fallback model variants#5059
chrarnoldus merged 3 commits into
mainfrom
update-getfallbackmodelvariants-fallbacks

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add fallback variants for popular Gemma, Laguna, Ling, and Nemotron model families
  • align Claude max reasoning effort with the latest catalog metadata
  • order OpenAI and custom LLM reasoning variants consistently from most to least intensive
  • add focused coverage for family matching, endpoint-suffixed model IDs, and variant ordering

Validation

  • pnpm --filter web test --runInBand src/lib/ai-gateway/providers/variants.test.ts src/lib/ai-gateway/custom-llm/order-opencode-variants.test.ts
  • pnpm --filter web run typecheck
  • pnpm exec oxlint --config .oxlintrc.json apps/web/src/lib/ai-gateway/providers/variants.ts apps/web/src/lib/ai-gateway/providers/variants.test.ts apps/web/src/lib/ai-gateway/custom-llm/order-opencode-variants.ts apps/web/src/lib/ai-gateway/custom-llm/order-opencode-variants.test.ts
  • pnpm exec oxfmt --list-different apps/web/src/lib/ai-gateway/providers/variants.ts apps/web/src/lib/ai-gateway/providers/variants.test.ts apps/web/src/lib/ai-gateway/custom-llm/order-opencode-variants.ts apps/web/src/lib/ai-gateway/custom-llm/order-opencode-variants.test.ts
  • git diff --check

All pnpm commands emitted the existing engine warning because the local runtime is Node 26 while the repository requires Node 24.

@chrarnoldus chrarnoldus self-assigned this Aug 5, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the Claude max-expectation test update verified the changed effort: 'max' assertions and updated catalog comment against REASONING_VARIANTS_CLAUDE (max → effort 'max' + verbosity 'max', xhigh → effort 'xhigh' + verbosity 'xhigh'), the isClaudeModel matcher, and the ReasoningEffortSchema/VerbositySchema enums with high confidence — the expectations now match the implementation, and no bugs, security issues, or memory-leak risks were found in the changed lines.

Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/auto-model/resolution.test.ts
Previous Review Summaries (2 snapshots, latest commit e0453e4)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e0453e4)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the variant-ordering alignment commit verified the reversed VARIANT_ORDERS rank lists and the OpenAI fallback .reverse() against the ReasoningEffortSchema option order, the isOpenAiModel matcher, updated tests, and all downstream consumers with high confidence — no bugs, security issues, or memory-leak risks found in the changed lines.

Files Reviewed (4 files)
  • apps/web/src/lib/ai-gateway/custom-llm/order-opencode-variants.ts
  • apps/web/src/lib/ai-gateway/custom-llm/order-opencode-variants.test.ts
  • apps/web/src/lib/ai-gateway/providers/variants.ts
  • apps/web/src/lib/ai-gateway/providers/variants.test.ts

Previous review (commit 515cab2)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Fallback-variant additions for Gemma, Laguna, Ling, and Nemotron families plus the Claude max effort alignment were verified against ReasoningEffortSchema, provider matcher precedence, and the model catalog with high confidence — no bugs, security issues, or memory-leak risks found in the changed lines.

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/variants.ts
  • apps/web/src/lib/ai-gateway/providers/variants.test.ts

Reviewed by kimi-k3 · Input: 67.9K · Output: 22K · Cached: 1.2M

Review guidance: REVIEW.md from base branch main

@chrarnoldus
chrarnoldus merged commit e42ae28 into main Aug 5, 2026
16 checks passed
@chrarnoldus
chrarnoldus deleted the update-getfallbackmodelvariants-fallbacks branch August 5, 2026 21:03
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