feat(openrouter): add Qwen3-235B models#20455
Merged
ishaan-jaff merged 1 commit intoBerriAI:mainfrom Feb 5, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile OverviewGreptile SummaryThis PR adds two new Qwen3-235B OpenRouter models to the pricing configuration and includes GitHub Copilot improvements. Changes:
Scope Note: Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Added pricing configuration for two Qwen3-235B models with correct pricing and context window values |
| litellm/main.py | Added auto-injection of GitHub Copilot headers in completion function for github_copilot provider |
| litellm/llms/github_copilot/chat/transformation.py | Removed system-to-assistant message conversion and added Copilot header injection in validate_environment |
| docs/my-website/docs/providers/github_copilot.md | Updated documentation to reflect auto-injection of headers and added system prompt support example |
| docs/my-website/docs/proxy/config_settings.md | Marked disable_copilot_system_to_assistant setting as deprecated |
Sequence Diagram
sequenceDiagram
participant User
participant main.py
participant GithubCopilotConfig
participant Authenticator
participant CopilotAPI as GitHub Copilot API
User->>main.py: completion(model="github_copilot/gpt-4", messages=[...])
alt custom_llm_provider == "github_copilot"
main.py->>Authenticator: get_api_key()
Authenticator-->>main.py: copilot_api_key
main.py->>main.py: get_copilot_default_headers(api_key)
Note over main.py: Auto-inject headers:<br/>- editor-version<br/>- copilot-integration-id<br/>- user-agent, etc.
main.py->>main.py: Merge with extra_headers (if provided)
end
main.py->>GithubCopilotConfig: transform_request(messages, ...)
Note over GithubCopilotConfig: System prompts preserved<br/>(no conversion to assistant)
GithubCopilotConfig-->>main.py: transformed_messages
main.py->>GithubCopilotConfig: validate_environment()
GithubCopilotConfig->>Authenticator: get_api_key()
Authenticator-->>GithubCopilotConfig: copilot_api_key
GithubCopilotConfig->>GithubCopilotConfig: get_copilot_default_headers(api_key)
GithubCopilotConfig->>GithubCopilotConfig: Add X-Initiator header
GithubCopilotConfig-->>main.py: validated_headers
main.py->>CopilotAPI: POST /chat/completions<br/>(with auto-injected headers)
CopilotAPI-->>main.py: response
main.py-->>User: completion response
Add OpenRouter Qwen3-235B-A22B models to the pricing configuration: - openrouter/qwen/qwen3-235b-a22b-2507 - openrouter/qwen/qwen3-235b-a22b-thinking-2507 Closes request from PR BerriAI#13019 comments.
366c89e to
8e34826
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issues
Addresses request from PR #13019 comment
Pre-Submission checklist
tests/litellm/directory, Adding at least 1 test is a hard requirement - N/A (pricing data only, no code changes)make test-unitType
🆕 New Feature
Changes
Add OpenRouter Qwen3-235B-A22B models to
model_prices_and_context_window.json:openrouter/qwen/qwen3-235b-a22b-2507openrouter/qwen/qwen3-235b-a22b-thinking-2507Pricing verified from OpenRouter documentation: