Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Update default LLM provider models#314

Merged
brovatten merged 2 commits into
mainfrom
update-llm-provider-models
Apr 22, 2026
Merged

Update default LLM provider models#314
brovatten merged 2 commits into
mainfrom
update-llm-provider-models

Conversation

@brovatten
Copy link
Copy Markdown
Member

@brovatten brovatten commented Apr 19, 2026

Summary by CodeRabbit

  • Chores
    • Updated default AI model selections across providers (Vercel, Anthropic, Google, AWS Bedrock, Cerebras, OpenRouter) to newer model variants, improving response quality, reasoning, and content parsing reliability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a007b130-66bb-4a4e-b068-36da4ded182e

📥 Commits

Reviewing files that changed from the base of the PR and between c05d2fd and c1df214.

📒 Files selected for processing (1)
  • agents/llm_config.py

📝 Walkthrough

Walkthrough

Updated default model identifiers and LLM type tags in the provider defaults within LLM_PROVIDERS (agent and parsing models) for multiple providers; changes are limited to constant values in agents/llm_config.py.

Changes

Cohort / File(s) Summary
LLM Provider Configuration Updates
agents/llm_config.py
Replaced and normalized provider model IDs and llm_type values: Anthropic agent→claude-sonnet-4-6, parsing→claude-haiku-4-5; Google parsing→gemini-3.1-flash-lite-preview; OpenRouter agent→google/gemini-3-flash, parsing→google/gemini-3.1-flash-lite-preview; AWS Bedrock model IDs simplified to anthropic.claude-sonnet-4-6/claude-haiku-4-5 and llm_typeLLMType.CLAUDE_SONNET; Cerebras agent→zai-glm-4.7, llm_typeLLMType.KIMI; Vercel comment trimmed (no functional change).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I nibbled configs, hopped through lines,
I swapped the names and tuned the signs.
Claude and Gemini, shining bright,
New model hops through day and night.
A little rabbit's joyful cheer — configs updated, hoppity near!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update default LLM provider models' clearly and concisely summarizes the main change: updating model selections across multiple LLM provider configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-llm-provider-models

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

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

Inline comments:
In `@agents/llm_config.py`:
- Around line 176-178: The Cerebras config block currently sets llm_type to
LLMType.KIMI while agent_model is "zai-glm-4.7"; change the llm_type assignment
to LLMType.GLM so the GLM-specific behavior is used (find the block with
agent_model="zai-glm-4.7" and parsing_model="gpt-oss-120b" and replace
llm_type=LLMType.KIMI with llm_type=LLMType.GLM).
- Line 242: The agent configuration uses the wrong Gemini 3 Flash slug causing
model_not_found; update the agent_model setting in agents/llm_config.py (the
agent_model variable/keyword) to OpenRouter's preview slug
"google/gemini-3-flash-preview" wherever agent_model="google/gemini-3-flash" is
set, ensuring the non-preview Vercel AI Gateway slug is not used.
- Line 165: Replace the Anthropic alias in the parsing_model setting with the
full AWS Bedrock model identifier: locate the parsing_model parameter (currently
"claude-haiku-4-5") in llm_config.py and change its value to the Bedrock ID
"anthropic.claude-haiku-4-5-20251001-v1:0" so ChatBedrockConverse receives the
correct Bedrock model string; ensure the string format matches the existing
agent_model style (e.g., "anthropic.claude-sonnet-4-6") used earlier in the
file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f400cbc-c9aa-40e0-aaf4-f026964b0d5c

📥 Commits

Reviewing files that changed from the base of the PR and between 5a8e8de and c05d2fd.

📒 Files selected for processing (1)
  • agents/llm_config.py

Comment thread agents/llm_config.py
parsing_model="us.anthropic.claude-3-haiku-20240307-v1:0",
llm_type=LLMType.CLAUDE,
agent_model="anthropic.claude-sonnet-4-6",
parsing_model="claude-haiku-4-5",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

AWS Bedrock Claude Haiku 4.5 model ID anthropic.claude-haiku-4-5-20251001-v1:0

💡 Result:

Yes, the model ID "anthropic.claude-haiku-4-5-20251001-v1:0" is the correct ID for AWS Bedrock's Claude Haiku 4.5 model. It is available via the bedrock-runtime endpoint and supported in numerous AWS regions for cross-region inference. Launched October 16, 2025, it supports text and image input, text output, up to 64K output tokens, and reasoning.

Citations:


🏁 Script executed:

cat -n agents/llm_config.py | sed -n '155,175p'

Repository: CodeBoarding/CodeBoarding

Length of output: 914


🏁 Script executed:

find . -type f -name "*.py" -exec grep -l "ChatBedrockConverse" {} \;

Repository: CodeBoarding/CodeBoarding

Length of output: 91


🏁 Script executed:

grep -r "class ChatBedrockConverse\|from.*ChatBedrockConverse\|import.*ChatBedrockConverse" --include="*.py"

Repository: CodeBoarding/CodeBoarding

Length of output: 135


Fix AWS Bedrock Haiku model ID to use the full Bedrock identifier.

Line 165 uses "claude-haiku-4-5", which is the Anthropic API alias. ChatBedrockConverse requires the full AWS Bedrock model ID. Note that line 164's agent_model already uses the correct format ("anthropic.claude-sonnet-4-6"); parsing_model should match. The correct Bedrock Haiku 4.5 model ID is "anthropic.claude-haiku-4-5-20251001-v1:0".

Proposed fix
-        parsing_model="claude-haiku-4-5",
+        parsing_model="anthropic.claude-haiku-4-5-20251001-v1:0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
parsing_model="claude-haiku-4-5",
parsing_model="anthropic.claude-haiku-4-5-20251001-v1:0",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@agents/llm_config.py` at line 165, Replace the Anthropic alias in the
parsing_model setting with the full AWS Bedrock model identifier: locate the
parsing_model parameter (currently "claude-haiku-4-5") in llm_config.py and
change its value to the Bedrock ID "anthropic.claude-haiku-4-5-20251001-v1:0" so
ChatBedrockConverse receives the correct Bedrock model string; ensure the string
format matches the existing agent_model style (e.g.,
"anthropic.claude-sonnet-4-6") used earlier in the file.

Comment thread agents/llm_config.py
Comment on lines +176 to +178
agent_model="zai-glm-4.7",
parsing_model="gpt-oss-120b",
llm_type=LLMType.KIMI,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Cerebras zai-glm-4.7 GLM 4.7 model ID

💡 Result:

The model ID for Z.ai GLM 4.7 on Cerebras Inference is zai-glm-4.7.

Citations:


🏁 Script executed:

# Find LLMType definition
fd -e py | xargs grep -l "class LLMType" | head -5

Repository: CodeBoarding/CodeBoarding

Length of output: 101


🏁 Script executed:

# Check agents/llm_config.py around the specified lines
cat -n agents/llm_config.py | sed -n '170,185p'

Repository: CodeBoarding/CodeBoarding

Length of output: 603


🏁 Script executed:

# Search for LLMType.from_model_name definition
rg "def from_model_name" -A 20

Repository: CodeBoarding/CodeBoarding

Length of output: 1542


Change llm_type to LLMType.GLM for the Cerebras config.

zai-glm-4.7 is a GLM model, and the from_model_name() function already maps "glm" to LLMType.GLM. Setting LLMType.KIMI risks applying Kimi-specific prompting logic to a GLM model if this field is used directly.

Proposed fix
         agent_model="zai-glm-4.7",
         parsing_model="gpt-oss-120b",
-        llm_type=LLMType.KIMI,
+        llm_type=LLMType.GLM,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
agent_model="zai-glm-4.7",
parsing_model="gpt-oss-120b",
llm_type=LLMType.KIMI,
agent_model="zai-glm-4.7",
parsing_model="gpt-oss-120b",
llm_type=LLMType.GLM,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@agents/llm_config.py` around lines 176 - 178, The Cerebras config block
currently sets llm_type to LLMType.KIMI while agent_model is "zai-glm-4.7";
change the llm_type assignment to LLMType.GLM so the GLM-specific behavior is
used (find the block with agent_model="zai-glm-4.7" and
parsing_model="gpt-oss-120b" and replace llm_type=LLMType.KIMI with
llm_type=LLMType.GLM).

Comment thread agents/llm_config.py
api_key_env="OPENROUTER_API_KEY",
agent_model="google/gemini-2.5-flash",
parsing_model="google/gemini-2.5-flash",
agent_model="google/gemini-3-flash",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

OpenRouter Google Gemini 3 Flash Preview model ID google/gemini-3-flash-preview

💡 Result:

Yes, the model ID for Google's Gemini 3 Flash Preview on OpenRouter is "google/gemini-3-flash-preview". This is confirmed directly from OpenRouter's official model pages and documentation. It is a high-speed, cost-effective model released on December 17, 2025, with a 1.05M token context window, multimodal support (text, images, audio, video, PDFs), tool use, structured outputs, and configurable reasoning levels. Pricing is $0.50 per million input tokens and $3 per million output tokens via providers like Google Vertex and Google AI Studio.

Citations:


🏁 Script executed:

# First, let's check the file and the specific line in question
wc -l agents/llm_config.py

Repository: CodeBoarding/CodeBoarding

Length of output: 93


🏁 Script executed:

# Read the relevant section around line 242
sed -n '235,250p' agents/llm_config.py

Repository: CodeBoarding/CodeBoarding

Length of output: 614


🏁 Script executed:

# Search for all occurrences of gemini-3-flash in the codebase
rg "gemini-3-flash" --type py -n

Repository: CodeBoarding/CodeBoarding

Length of output: 444


🏁 Script executed:

# Check if there's any documentation about model slugs or OpenRouter configuration
rg -i "openrouter" --type py -A 5 -B 5

Repository: CodeBoarding/CodeBoarding

Length of output: 19341


🏁 Script executed:

# Check if the parsing_model on line 243 is correct for OpenRouter
# Search for any OpenRouter model catalog entries with gemini-3.1-flash-lite
rg "gemini-3.1-flash-lite" --type py -B 2 -A 2

Repository: CodeBoarding/CodeBoarding

Length of output: 1015


Change agent_model to OpenRouter's Gemini 3 Flash slug.

OpenRouter lists Gemini 3 Flash as google/gemini-3-flash-preview; the non-preview slug is the Vercel AI Gateway model and will fail with model_not_found on OpenRouter.

Proposed fix
-        agent_model="google/gemini-3-flash",
+        agent_model="google/gemini-3-flash-preview",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
agent_model="google/gemini-3-flash",
agent_model="google/gemini-3-flash-preview",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@agents/llm_config.py` at line 242, The agent configuration uses the wrong
Gemini 3 Flash slug causing model_not_found; update the agent_model setting in
agents/llm_config.py (the agent_model variable/keyword) to OpenRouter's preview
slug "google/gemini-3-flash-preview" wherever
agent_model="google/gemini-3-flash" is set, ensuring the non-preview Vercel AI
Gateway slug is not used.

Copy link
Copy Markdown
Member

@ivanmilevtues ivanmilevtues left a comment

Choose a reason for hiding this comment

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

good to go just fix the vercel back to gpt-5-mini

Comment thread agents/llm_config.py Outdated
api_key_env="VERCEL_API_KEY",
agent_model="google/gemini-3-flash",
parsing_model="openai/gpt-5-mini", # Use OpenAI model for parsing to avoid trustcall compatibility issues with Gemini
parsing_model="google/gemini-3.1-flash-lite-preview",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is borken, we cannot use gemini for vercel ;d

@brovatten brovatten merged commit 8fb2635 into main Apr 22, 2026
1 of 2 checks passed
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