Skip to content

feat(pricing): add groq/qwen/qwen3.6-27b to model cost map#34611

Open
msdianprince-7 wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
msdianprince-7:add_groq_qwen3_6_27b_pricing
Open

feat(pricing): add groq/qwen/qwen3.6-27b to model cost map#34611
msdianprince-7 wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
msdianprince-7:add_groq_qwen3_6_27b_pricing

Conversation

@msdianprince-7

Copy link
Copy Markdown

TLDR

Problem this solves:

  • groq/qwen/qwen3.6-27b is served by Groq but missing from the cost map
  • cost tracking for it silently returns 0 and get_model_info raises

How it solves it:

  • add the model entry with pricing and capability flags from Groq's API
  • add a regression test so the values cannot silently drift

Relevant issues

No open issue tracks this; the model is simply absent from the cost map

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

Captured at commit ca07027 against a live proxy hitting the real Groq API

Before: on any commit without this entry, get_model_info("groq/qwen/qwen3.6-27b") raises "This model isn't mapped yet" and the proxy logs "not in built-in cost map ... cost fields will default to 0", so x-litellm-response-cost comes back 0

After (this commit), config points qwen3.6-27b at groq/qwen/qwen3.6-27b:

curl -sS -D - http://localhost:4001/v1/chat/completions \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"qwen3.6-27b","messages":[{"role":"user","content":"Reply with exactly: pricing works"}],"max_tokens":15}'

HTTP/1.1 200 OK
x-litellm-model-id: 532b52a7c9b7174177e97790238d75e2a45b6bfd6acf5c7aac9bd41cd2f44d14
x-litellm-response-cost: 5.46e-05

usage was 16 prompt + 15 completion tokens, and 16 * 6e-07 + 15 * 3e-06 = 5.46e-05, which matches the header exactly

Type

🆕 New Feature

Changes

Adds groq/qwen/qwen3.6-27b to model_prices_and_context_window.json and the bundled backup, with input 0.60 USD/1M, output 3.00 USD/1M, cached input 0.30 USD/1M, a 131072 context window, 16384 max output tokens, and function calling, tool choice, JSON schema, reasoning and vision flags, all sourced from Groq's models API

Adds tests/test_litellm/llms/groq/test_groq_qwen3_6_27b_metadata.py asserting the resolved model info and the raw cost-map entry so the pricing and capability flags are regression covered

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Groq serves qwen/qwen3.6-27b but it was missing from the cost map, so
cost tracking for it silently defaulted to zero and get_model_info raised
"This model isn't mapped yet"

Pricing, context window and capability flags are taken from Groq's models
API: 0.60 USD/1M input tokens, 3.00 USD/1M output tokens, 0.30 USD/1M
cached input tokens, 131072 context window, 16384 max output, tools, JSON
schema, reasoning and image input support

Added a regression test asserting the resolved model info and the raw
cost-map entry so the pricing and capability flags cannot silently drift
@CLAassistant

CLAassistant commented Jul 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds Groq pricing and capability metadata for qwen/qwen3.6-27b to both cost maps, with focused regression coverage for model-info resolution and raw metadata values

Confidence Score: 5/5

The PR appears safe to merge; the new model metadata is consistent across both cost maps and is covered by focused regression tests

The model key, pricing, token limits, and capability flags follow existing Groq cost-map conventions, and the canonical and bundled entries are synchronized

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds the canonical Groq model entry with internally consistent token limits, pricing, and capability fields
litellm/model_prices_and_context_window_backup.json Mirrors the new model metadata from the canonical cost map without value drift
tests/test_litellm/llms/groq/test_groq_qwen3_6_27b_metadata.py Adds local, network-free regression tests covering resolved and raw bundled model metadata

Reviews (1): Last reviewed commit: "feat(pricing): add groq/qwen/qwen3.6-27b..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing msdianprince-7:add_groq_qwen3_6_27b_pricing (ca07027) with litellm_internal_staging (b9b27c2)

Open in CodSpeed

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