Skip to content

docs(proxy): clarify x-litellm-model-group vs provider model id#25497

Merged
krrish-berri-2 merged 4 commits intolitellm_internal_stagingfrom
litellm_docs-response-headers-model-group
Apr 24, 2026
Merged

docs(proxy): clarify x-litellm-model-group vs provider model id#25497
krrish-berri-2 merged 4 commits intolitellm_internal_stagingfrom
litellm_docs-response-headers-model-group

Conversation

@Sameerlite
Copy link
Copy Markdown
Collaborator

@Sameerlite Sameerlite commented Apr 10, 2026

Documents that x-litellm-model-group reflects proxy model_list model_name (client alias), not litellm_params.model, and points readers to x-litellm-model-id for the deployment identifier.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 17, 2026 0:59am

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 10, 2026

Greptile Summary

This docs-only PR clarifies the distinction between x-litellm-model-group (the model_list[].model_name client alias) and x-litellm-model-id (the deployment's model_info.id), adding a YAML config example and a concrete header-value mapping table to make the difference tangible for readers.

Confidence Score: 5/5

Safe to merge; documentation-only change with no code or schema impact.

All findings are P2 style suggestions. The core clarification around model-group vs model-id is accurate and adds real value. No code paths, tests, or migrations are affected.

No files require special attention.

Important Files Changed

Filename Overview
docs/my-website/docs/proxy/response_headers.md Docs-only clarification: sharpened table descriptions for x-litellm-model-group / x-litellm-model-id, added YAML example and illustrative values table; no code changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Client["Client request\n(model: my-chat-model)"]
    Proxy["LiteLLM Proxy\nroutes via model_list"]
    Upstream["Upstream Provider\n(e.g. OpenAI gpt-4o-mini)"]
    Headers["Response Headers set by Proxy"]

    Client --> Proxy
    Proxy -->|"resolves model_name → litellm_params.model"| Upstream
    Upstream --> Proxy
    Proxy --> Headers

    Headers --> H1["x-litellm-model-group: my-chat-model\n(model_list[].model_name)"]
    Headers --> H2["x-litellm-model-id: 7c9f2a1b…\n(model_info.id — deployment row)"]
    Headers --> H3["x-litellm-call-id, x-litellm-version,\nx-litellm-model-api-base, …"]
Loading

Reviews (2): Last reviewed commit: "Fix docs on feedback" | Re-trigger Greptile

Comment thread docs/my-website/docs/proxy/response_headers.md Outdated
@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented Apr 10, 2026

Congrats! CodSpeed is installed 🎉

🆕 16 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


Open in CodSpeed

@krrish-berri-2 krrish-berri-2 enabled auto-merge (squash) April 11, 2026 15:49
| `x-litellm-model-group` | string | Model group identifier | |
| `x-litellm-model-group` | string | Routed **`model_name`** from `model_list` (client-visible alias) | |

This header names the **model group** LiteLLM selected: the **`model_name`** entry in your proxy `model_list`—the same value clients send as `model`. It does **not** mirror **`litellm_params.model`** (the actual provider model id LiteLLM forwards upstream). Use **`x-litellm-model-id`** when you need the deployment identifier.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you make this simpler ? I don't know what this means

Can you give me clear examples of diff headers and what they mean on a table with example values

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Copy Markdown
Collaborator

@milan-berri milan-berri left a comment

Choose a reason for hiding this comment

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

lgtm!

@Sameerlite
Copy link
Copy Markdown
Collaborator Author

IT is a docs change, all the failing test should be unrelated to it

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 24, 2026

Too many files changed for review. (115 files found, 100 file limit)

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
4 out of 6 committers have signed the CLA.

✅ Sameerlite
✅ ryan-crabbe-berri
✅ yuneng-berri
✅ shivamrawat1
❌ shin-berri
❌ ishaan-berri
You have signed the CLA already but the status is still pending? Let us recheck it.

@yuneng-berri yuneng-berri changed the base branch from main to litellm_internal_staging April 24, 2026 16:41
@veria-ai
Copy link
Copy Markdown

veria-ai Bot commented Apr 24, 2026

Low: No security issues found

This PR is a large mixed change covering CI refactoring, docs updates, model registry additions, and several feature additions (DashScope image generation, Gemini embedding 2 GA, reasoning effort normalization, Responses API bridge). The security-relevant changes are all improvements: additional parameters banned from request bodies (aws_sts_endpoint, aws_web_identity_token, aws_role_name, vertex_credentials), input validation on image edit endpoints rejecting string values for file fields, Vertex AI location format validation, Snowflake account_id sanitization, Bedrock ARN region validation, SSRF-safe URL fetching in image processing, and refined MCP route classification separating management from inference routes.


Status: 0 open
Risk: 2/10

Posted by Veria AI · 2026-04-24T16:43:43.440Z

@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented Apr 24, 2026

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
31539530 Triggered Generic Password c4c9af0 .github/workflows/_test-unit-services-base.yml View secret
29203053 Triggered Generic Password c4c9af0 .circleci/config.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@krrish-berri-2 krrish-berri-2 merged commit a0c52cd into litellm_internal_staging Apr 24, 2026
118 of 125 checks passed
@krrish-berri-2 krrish-berri-2 deleted the litellm_docs-response-headers-model-group branch April 24, 2026 16:59
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.

6 participants