You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: make static aliases visible in /v1/models and in the per-request routing log #1237
static_aliases rewrites the requested model to its target silently:
/v1/models lists only the target models, so clients can't discover which alias names they may send.
The per-request log line (Routing request <id> with session id ... to <backend>) records neither the name the client sent nor the routed model. When several aliases point at one backend, you can't attribute load to callers. We needed exactly that during an incident.
Proposal:
List each alias in /v1/models as its own entry, with root set to the target model, so OpenAI-compatible clients can discover the names they may send.
Add the requested model, the routed model, the stream flag and max_tokens (max_completion_tokens when set) to the per-request INFO line, for example: ... requested_model='alias-a' model='org/target' stream=False max_tokens=None. max_tokens=None makes requests with no generation limit easy to find. Client values are repr-quoted, so a crafted model name can't inject log lines.
Use Case
Several client-facing names, such as retired or disabled models, route to one served model. Operators need to see who sends which name, and clients need to know which names are valid.
Proposed Solution
Both changes run in our production fork (Mazyod/production-stack), with tests. We'd be glad to open PRs if you'd like either one.
Activity