Skip to content

feat(openrouter): add Qwen3-235B models#20455

Merged
ishaan-jaff merged 1 commit intoBerriAI:mainfrom
Chesars:feat/add-openrouter-qwen3-235b-models
Feb 5, 2026
Merged

feat(openrouter): add Qwen3-235B models#20455
ishaan-jaff merged 1 commit intoBerriAI:mainfrom
Chesars:feat/add-openrouter-qwen3-235b-models

Conversation

@Chesars
Copy link
Contributor

@Chesars Chesars commented Feb 5, 2026

Relevant issues

Addresses request from PR #13019 comment

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - N/A (pricing data only, no code changes)
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

Add OpenRouter Qwen3-235B-A22B models to model_prices_and_context_window.json:

Model Input $/M Output $/M Context Features
openrouter/qwen/qwen3-235b-a22b-2507 $0.071 $0.10 262,144 function_calling, tool_choice
openrouter/qwen/qwen3-235b-a22b-thinking-2507 $0.11 $0.60 262,144 function_calling, tool_choice, reasoning

Pricing verified from OpenRouter documentation:

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 5, 2026 3:36am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR adds two new Qwen3-235B OpenRouter models to the pricing configuration and includes GitHub Copilot improvements.

Changes:

  • Added openrouter/qwen/qwen3-235b-a22b-2507 and openrouter/qwen/qwen3-235b-a22b-thinking-2507 models to model_prices_and_context_window.json with correct pricing (verified against OpenRouter docs)
  • GitHub Copilot now auto-injects required headers (eliminates manual extra_headers requirement)
  • GitHub Copilot API now preserves system prompts (removed system-to-assistant conversion)
  • Deprecated disable_copilot_system_to_assistant configuration flag

Scope Note:
The PR description mentions only pricing data changes, but includes a separate commit (72e38e8) with GitHub Copilot functionality improvements. Consider updating the PR description to reflect both changes.

Confidence Score: 4/5

  • This PR is safe to merge with minor documentation discrepancy
  • Both changes are low-risk: the Qwen3 model additions are pure data entries with verified pricing, and the GitHub Copilot changes improve UX by auto-injecting headers and preserving system prompts. Score reduced by 1 point due to PR description not matching actual scope (mentions only pricing changes but includes GitHub Copilot improvements).
  • No files require special attention - all changes are straightforward and well-implemented

Important Files Changed

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
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.
@Chesars Chesars force-pushed the feat/add-openrouter-qwen3-235b-models branch from 366c89e to 8e34826 Compare February 5, 2026 03:30
@ishaan-jaff ishaan-jaff merged commit e080278 into BerriAI:main Feb 5, 2026
5 of 8 checks passed
@Chesars Chesars deleted the feat/add-openrouter-qwen3-235b-models branch February 5, 2026 10:21
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