Skip to content

feature: Record the model that served each response, from x-litellm-model-name #1642

Closed

Description

@huang195

Problem

A recorded event names the model from the request body only. inference.model is the model that the client asked for. Nothing records the model that served the response.

  • Through a gateway alias (for example, a LiteLLM alias such as claude-advantage-assist), the agentop viewer shows the alias, not the real model.
  • LiteLLM sends the served model in the x-litellm-model-name response header. Cortex already reads other x-litellm-* response headers for cost (settle.go#L60).
  • Some response bodies also carry a model field. The parser does not read it.

Suggested change

Record the served model on the response event (for example inference.responseModel). Read x-litellm-model-name first, then the response body's model field. Show it in agentop when it is different from the requested model.

Activity

  1. added
    enhancement
    laptop
    on Nov 3, 2026
  2. added a commit that references this issue on Nov 3, 2026
    b4f93b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlaptop

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions