Skip to content

fix(proxy): authorize the public name of a team-scoped model on batch retrieve/cancel - #47067

Merged
mateo-berri merged 4 commits into
BerriAI:mainfrom
Mrun25:fix/batch-retrieve-team-model-403-46958
Oct 18, 2026
Merged

mateo-berri merged 4 commits into
BerriAI:mainfrom
Mrun25:fix/batch-retrieve-team-model-403-46958

Conversation

@Mrun25

@Mrun25 Mrun25 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Team keys get 403 reading or cancelling their own team's batches
  • The batch id names the team model's internal deployment name
  • Teams normally grant the public name, so every auth path denies it
  • The team also cannot download the finished batch's results

How it solves it:

  • The model access check now maps a team deployment's internal name
  • It accepts the owning team's public name and its team aliases
  • A team alias counts only for keys whose own models grant that alias
  • Only the team that owns the deployment gets that match
  • Covers batch, file, fine-tuning, vector store, character, and video ids
  • Teams that granted the internal name keep working as before

Intentional product change: a key of the owning team that is granted the public name can now also name the deployment by its internal model_name_<team id>_<uuid> name, on direct requests and /cost/predict-cache too. Other teams gain nothing

User Flow

Before: a team member can create a batch on their team's model but cannot check on it, cancel it, or download its results

  1. A team admin adds team model team-batch-model on https://litellm-domain/ui/?page=models
  2. A team member sends POST https://litellm-domain/v1/files (purpose=batch, target_model_names=team-batch-model), then POST https://litellm-domain/v1/batches, and gets a batch id
  3. They send GET https://litellm-domain/v1/batches/{batch_id} with the same team key or custom auth token
  4. It returns 403 team_model_access_denied naming model_name_<team id>_<uuid>, and POST .../cancel fails the same way
  5. Even with the output_file_id from an admin, GET https://litellm-domain/v1/files/{output_file_id}/content returns 403
  6. Another team's key also gets 403 on the batch

After: the same team member checks, cancels, and downloads the results with the key that created the batch

  1. A team admin adds team model team-batch-model on https://litellm-domain/ui/?page=models
  2. A team member sends POST https://litellm-domain/v1/files (purpose=batch, target_model_names=team-batch-model), then POST https://litellm-domain/v1/batches, and gets a batch id
  3. They send GET https://litellm-domain/v1/batches/{batch_id} with the same team key or custom auth token
  4. It returns 200 and moves to completed with an output_file_id, and POST .../cancel returns 200 with status cancelling
  5. GET https://litellm-domain/v1/files/{output_file_id}/content returns 200 with the JSONL results
  6. Another team's key still gets 403, even when that team also has a team-batch-model

Relevant issues

Fixes #46958

Affected release

Regression in v1.103.0 for custom auth setups. Plain team keys were denied before that too

Linear ticket

Resolves LIT-9739

Pre-Submission checklist

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

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

QA of PR #47067 at head ef9668d, with the merge base b6ca57b as the before leg. Both legs ran one proxy on localhost:4000 with --num_workers 2, a fresh Postgres database per leg, store_model_in_db: true, and custom_auth in auto mode. Every batch, chat and file call went to the real OpenAI API on openai/gpt-6-luna, the cheapest current OpenAI model in model_prices_and_context_window.json that supports batches

Each leg sets up two teams, team A and team B. Both get a team model whose public name is team-batch-model, which the proxy stores as model_name_<team_id>_<uuid>. Team A's keys are $KEY_A (no model limit), $KEY_A_OTHER and $KEY_A_OTHER2 (models: ["gpt-6-luna"]), and $KEY_A_ALIAS (models: ["legacy-team-model"]). Team B's key is $KEY_B. $CUSTOM_AUTH_TOKEN is a custom auth token that maps to team A with team_models: ["team-batch-model"], the setup from the original report. Keys and the master key show up only as variable names

Case Before (b6ca57b) After (ef9668d)
1. Team A key creates a batch on team-batch-model, then retrieves and cancels it 403 team_model_access_denied on both retrieves and on cancel 200 on both retrieves and on cancel, and the batch completes
1b. Same flow with the custom auth token 403 on retrieve and on cancel 200 on retrieve. Cancel got one OpenAI 500, then 200 on retry
1c. Team A key downloads the finished batch's output 403 on retrieve. File content 403 permission_error 200 on retrieve. File content 200 with the model's answer "Hi"
2. Team B key (also granted team-batch-model) on team A's batches 403 on retrieve and on cancel (object ownership) 403 on retrieve and on cancel (object ownership)
2b. Direct chat call that names team A's internal deployment name 200 for $KEY_A, 400 for $KEY_B 200 for $KEY_A, 400 for $KEY_B
3. Team A key limited to gpt-6-luna on team A's batches 403 key_model_access_denied on retrieve and on cancel 403 key_model_access_denied on retrieve and on cancel
3b. Team A also has legacy alias legacy-team-model, key limited to gpt-6-luna 403 on retrieve and on cancel 403 on retrieve and on cancel. The previous PR commit d4460ac returned 200 on both
3b. Same team, key limited to the alias legacy-team-model 403 on retrieve 200 on retrieve

1. Team A key creates a batch on its team model, then retrieves and cancels it

  1. An admin creates team A with models: ["team-batch-model", "gpt-6-luna"], adds a team model named team-batch-model for it, and creates $KEY_A for team A
  2. With $KEY_A, upload a batch input file with target_model_names=team-batch-model to POST /v1/files
  3. Create a batch from it with POST /v1/batches
  4. Retrieve it twice with GET /v1/batches/{batch_id} (twice so both workers serve a request)
  5. Create a second batch and cancel it with POST /v1/batches/{batch_id}/cancel
  6. Wait for the first batch to finish, then download its output with GET /v1/files/{output_file_id}/content

Before (b6ca57b), retrieve and cancel are refused

$ curl http://localhost:4000/v1/files -H "Authorization: Bearer $KEY_A" -F purpose=batch -F target_model_names=team-batch-model -F file=@batch.jsonl
{"id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw5ZDBmOTE5YS04ZTBmLTQ3NjAtOTUwMC1jZDE5OWM0NjE3OTU7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtWDNWM3FMQ2RMQURNZG9tYVk1cDl5ajtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","bytes":169,"created_at":1792282079,"filename":"modified_file.jsonl","object":"file","purpose":"batch","status":"uploaded","expires_at":1794874079,"status_details":null}
HTTP 200

$ curl http://localhost:4000/v1/batches -H "Authorization: Bearer $KEY_A" -H 'Content-Type: application/json' -d '{"input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw5ZDBmOTE5YS04ZTBmLTQ3NjAtOTUwMC1jZDE5OWM0NjE3OTU7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtWDNWM3FMQ2RMQURNZG9tYVk1cDl5ajtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","endpoint":"/v1/chat/completions","completion_window":"24h"}'
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm","completion_window":"24h","created_at":1792282079,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw5ZDBmOTE5YS04ZTBmLTQ3NjAtOTUwMC1jZDE5OWM0NjE3OTU7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtWDNWM3FMQ2RMQURNZG9tYVk1cDl5ajtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368479,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_A"   (retrieve, try 1)
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_A"   (retrieve, try 2)
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl http://localhost:4000/v1/batches -H "Authorization: Bearer $KEY_A" -H 'Content-Type: application/json' -d '{"input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw5ZDBmOTE5YS04ZTBmLTQ3NjAtOTUwMC1jZDE5OWM0NjE3OTU7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtWDNWM3FMQ2RMQURNZG9tYVk1cDl5ajtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","endpoint":"/v1/chat/completions","completion_window":"24h"}'   (second batch, to cancel)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwMGIxMDgxOTBiYzY2MDI2MjNkZmM3MGUy","completion_window":"24h","created_at":1792282080,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw5ZDBmOTE5YS04ZTBmLTQ3NjAtOTUwMC1jZDE5OWM0NjE3OTU7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtWDNWM3FMQ2RMQURNZG9tYVk1cDl5ajtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368480,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwMGIxMDgxOTBiYzY2MDI2MjNkZmM3MGUy/cancel -H "Authorization: Bearer $KEY_A"
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}}
HTTP 403

After (ef9668d), retrieve and cancel succeed

$ curl http://localhost:4000/v1/files -H "Authorization: Bearer $KEY_A" -F purpose=batch -F target_model_names=team-batch-model -F file=@batch.jsonl
{"id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","bytes":169,"created_at":1792281885,"filename":"modified_file.jsonl","object":"file","purpose":"batch","status":"uploaded","expires_at":1794873885,"status_details":null}
HTTP 200

$ curl http://localhost:4000/v1/batches -H "Authorization: Bearer $KEY_A" -H 'Content-Type: application/json' -d '{"input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","endpoint":"/v1/chat/completions","completion_window":"24h"}'
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A"   (retrieve, try 1)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A"   (retrieve, try 2)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":"gpt-6-luna","output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches -H "Authorization: Bearer $KEY_A" -H 'Content-Type: application/json' -d '{"input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","endpoint":"/v1/chat/completions","completion_window":"24h"}'   (second batch, to cancel)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh","completion_window":"24h","created_at":1792281887,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368287,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh/cancel -H "Authorization: Bearer $KEY_A"
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh","completion_window":"24h","created_at":1792281887,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"cancelling","cancelled_at":null,"cancelling_at":1792281887,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368287,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200
Admin setup for each leg

Before (b6ca57b)

$ curl -X POST http://localhost:4000/team/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-a","models":["team-batch-model","gpt-6-luna"]}'
{"team_alias":null,"team_id":"qa47067-base-team-a","organization_id":null,"admins":[],"members":[],"members_with_roles":[{"user_id":"default_user_id","user_email":null,"role":"admin"}],"team_member_permissions":[],"metadata":{},"tpm_limit":null,"rpm_limit":null,"tpd_limit":null,"max_budget":null,"soft_budget":null,"budget_duration":null,"budget_limits":null,"models":["team-batch-model","gpt-6-luna"],"blocked":false,"router_settings":{},"access_group_ids":[],"default_team_member_models":[],"spend":0.0,"max_parallel_requests":null,"budget_reset_at":null,"model_id":null,"model_spend":{},"model_max_budget":{},"policies":[],"allow_team_guardrail_config":false,"litellm_model_table":null,"object_permission":null,"object_permission_id":null,"updated_at":"2026-10-18T00:07:12.027000Z","created_at":"2026-10-18T00:07:12.027000Z"}
HTTP 200

$ curl -X POST http://localhost:4000/team/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-b","models":["team-batch-model"]}'
{"team_alias":null,"team_id":"qa47067-base-team-b","organization_id":null,"admins":[],"members":[],"members_with_roles":[{"user_id":"default_user_id","user_email":null,"role":"admin"}],"team_member_permissions":[],"metadata":{},"tpm_limit":null,"rpm_limit":null,"tpd_limit":null,"max_budget":null,"soft_budget":null,"budget_duration":null,"budget_limits":null,"models":["team-batch-model"],"blocked":false,"router_settings":{},"access_group_ids":[],"default_team_member_models":[],"spend":0.0,"max_parallel_requests":null,"budget_reset_at":null,"model_id":null,"model_spend":{},"model_max_budget":{},"policies":[],"allow_team_guardrail_config":false,"litellm_model_table":null,"object_permission":null,"object_permission_id":null,"updated_at":"2026-10-18T00:07:12.503000Z","created_at":"2026-10-18T00:07:12.503000Z"}
HTTP 200

$ curl -X POST http://localhost:4000/model/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"model_name":"team-batch-model","litellm_params":{"model":"openai/gpt-6-luna","api_key":"os.environ/OPENAI_API_KEY"},"model_info":{"team_id":"qa47067-base-team-a","team_public_model_name":"team-batch-model"}}'
{"model_id":"8f5c7ab4-3e53-4ec4-8d91-be5adb48cb92","model_name":"model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9","litellm_params":"<encrypted by the proxy, trimmed>","model_info":{"id":"8f5c7ab4-3e53-4ec4-8d91-be5adb48cb92","team_id":"qa47067-base-team-a","db_model":false,"member_auto_router":false,"team_public_model_name":"team-batch-model"},"blocked":false,"created_at":"2026-10-18T00:07:12.829000Z","created_by":"default_user_id","updated_at":"2026-10-18T00:07:12.829000Z","updated_by":"default_user_id"}
HTTP 200

$ curl -X POST http://localhost:4000/model/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"model_name":"team-batch-model","litellm_params":{"model":"openai/gpt-6-luna","api_key":"os.environ/OPENAI_API_KEY"},"model_info":{"team_id":"qa47067-base-team-b","team_public_model_name":"team-batch-model"}}'
{"model_id":"d778c604-df55-44ba-bd63-f081017aa3aa","model_name":"model_name_qa47067-base-team-b_ac070e6e-485c-40c6-892f-0339fd2d393c","litellm_params":"<encrypted by the proxy, trimmed>","model_info":{"id":"d778c604-df55-44ba-bd63-f081017aa3aa","team_id":"qa47067-base-team-b","db_model":false,"member_auto_router":false,"team_public_model_name":"team-batch-model"},"blocked":false,"created_at":"2026-10-18T00:07:13.061000Z","created_by":"default_user_id","updated_at":"2026-10-18T00:07:13.061000Z","updated_by":"default_user_id"}
HTTP 200

$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-a"}'   -> saved as $KEY_A
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-b"}'   -> saved as $KEY_B
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-a","models":["gpt-6-luna"]}'   -> saved as $KEY_A_OTHER

team A internal deployment name: model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9
team B internal deployment name: model_name_qa47067-base-team-b_ac070e6e-485c-40c6-892f-0339fd2d393c

After (ef9668d)

$ curl -X POST http://localhost:4000/team/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-a","models":["team-batch-model","gpt-6-luna"]}'
{"team_alias":null,"team_id":"qa47067-head-team-a","organization_id":null,"admins":[],"members":[],"members_with_roles":[{"user_id":"default_user_id","user_email":null,"role":"admin"}],"team_member_permissions":[],"metadata":{},"tpm_limit":null,"rpm_limit":null,"tpd_limit":null,"max_budget":null,"soft_budget":null,"budget_duration":null,"budget_limits":null,"models":["team-batch-model","gpt-6-luna"],"blocked":false,"router_settings":{},"access_group_ids":[],"default_team_member_models":[],"spend":0.0,"max_parallel_requests":null,"budget_reset_at":null,"model_id":null,"model_spend":{},"model_max_budget":{},"policies":[],"allow_team_guardrail_config":false,"litellm_model_table":null,"object_permission":null,"object_permission_id":null,"updated_at":"2026-10-18T00:04:11.011000Z","created_at":"2026-10-18T00:04:11.011000Z"}
HTTP 200

$ curl -X POST http://localhost:4000/team/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-b","models":["team-batch-model"]}'
{"team_alias":null,"team_id":"qa47067-head-team-b","organization_id":null,"admins":[],"members":[],"members_with_roles":[{"user_id":"default_user_id","user_email":null,"role":"admin"}],"team_member_permissions":[],"metadata":{},"tpm_limit":null,"rpm_limit":null,"tpd_limit":null,"max_budget":null,"soft_budget":null,"budget_duration":null,"budget_limits":null,"models":["team-batch-model"],"blocked":false,"router_settings":{},"access_group_ids":[],"default_team_member_models":[],"spend":0.0,"max_parallel_requests":null,"budget_reset_at":null,"model_id":null,"model_spend":{},"model_max_budget":{},"policies":[],"allow_team_guardrail_config":false,"litellm_model_table":null,"object_permission":null,"object_permission_id":null,"updated_at":"2026-10-18T00:04:11.264000Z","created_at":"2026-10-18T00:04:11.264000Z"}
HTTP 200

$ curl -X POST http://localhost:4000/model/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"model_name":"team-batch-model","litellm_params":{"model":"openai/gpt-6-luna","api_key":"os.environ/OPENAI_API_KEY"},"model_info":{"team_id":"qa47067-head-team-a","team_public_model_name":"team-batch-model"}}'
{"model_id":"efbc72fd-94c1-4e2d-87d7-eeda26220719","model_name":"model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4","litellm_params":"<encrypted by the proxy, trimmed>","model_info":{"id":"efbc72fd-94c1-4e2d-87d7-eeda26220719","team_id":"qa47067-head-team-a","db_model":false,"member_auto_router":false,"team_public_model_name":"team-batch-model"},"blocked":false,"created_at":"2026-10-18T00:04:11.402000Z","created_by":"default_user_id","updated_at":"2026-10-18T00:04:11.402000Z","updated_by":"default_user_id"}
HTTP 200

$ curl -X POST http://localhost:4000/model/new -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"model_name":"team-batch-model","litellm_params":{"model":"openai/gpt-6-luna","api_key":"os.environ/OPENAI_API_KEY"},"model_info":{"team_id":"qa47067-head-team-b","team_public_model_name":"team-batch-model"}}'
{"model_id":"e5fc3137-a459-4c18-88e7-2d0aff839af8","model_name":"model_name_qa47067-head-team-b_35d7ba5b-b3b8-4ad6-93ae-eb65f7e5ba8f","litellm_params":"<encrypted by the proxy, trimmed>","model_info":{"id":"e5fc3137-a459-4c18-88e7-2d0aff839af8","team_id":"qa47067-head-team-b","db_model":false,"member_auto_router":false,"team_public_model_name":"team-batch-model"},"blocked":false,"created_at":"2026-10-18T00:04:11.709000Z","created_by":"default_user_id","updated_at":"2026-10-18T00:04:11.709000Z","updated_by":"default_user_id"}
HTTP 200

$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-a"}'   -> saved as $KEY_A
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-b"}'   -> saved as $KEY_B
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-a","models":["gpt-6-luna"]}'   -> saved as $KEY_A_OTHER

team A internal deployment name: model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4
team B internal deployment name: model_name_qa47067-head-team-b_35d7ba5b-b3b8-4ad6-93ae-eb65f7e5ba8f

1b. The same flow with the custom auth token from the report

Commands and output

Before (b6ca57b)

$ curl http://localhost:4000/v1/files -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN" -F purpose=batch -F target_model_names=team-batch-model -F file=@batch.jsonl
{"id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw0MmE2OWUzZC03M2JiLTQ2YzUtYjczYy1hZTE5NDQxZjgyZTM7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtNVBBZDdDYjN5WFdKY1YzTVRybUZVaTtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","bytes":169,"created_at":1792282080,"filename":"modified_file.jsonl","object":"file","purpose":"batch","status":"uploaded","expires_at":1794874080,"status_details":null}
HTTP 200

$ curl http://localhost:4000/v1/batches -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN" -H 'Content-Type: application/json' -d '{"input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw0MmE2OWUzZC03M2JiLTQ2YzUtYjczYy1hZTE5NDQxZjgyZTM7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtNVBBZDdDYjN5WFdKY1YzTVRybUZVaTtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","endpoint":"/v1/chat/completions","completion_window":"24h"}'
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwZmY4NDgxOTA5Y2M4YzQ1YmVkNjE0ZTRk","completion_window":"24h","created_at":1792282080,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw0MmE2OWUzZC03M2JiLTQ2YzUtYjczYy1hZTE5NDQxZjgyZTM7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtNVBBZDdDYjN5WFdKY1YzTVRybUZVaTtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368480,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwZmY4NDgxOTA5Y2M4YzQ1YmVkNjE0ZTRk -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN"
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwZmY4NDgxOTA5Y2M4YzQ1YmVkNjE0ZTRk/cancel -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN"
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}}
HTTP 403

After (ef9668d). The cancel hit an OpenAI 500 after the proxy had already let the request through, and the retry returned 200

$ curl http://localhost:4000/v1/files -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN" -F purpose=batch -F target_model_names=team-batch-model -F file=@batch.jsonl
{"id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxkMzQ5ZDUxOS1hMjA4LTQ2MWUtYTdmOC02ZTQ1NmY1MzgwNTg7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtTFh6eDkyYUpEYmU0YnBDcmF5RHo2bztsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","bytes":169,"created_at":1792281888,"filename":"modified_file.jsonl","object":"file","purpose":"batch","status":"uploaded","expires_at":1794873888,"status_details":null}
HTTP 200

$ curl http://localhost:4000/v1/batches -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN" -H 'Content-Type: application/json' -d '{"input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxkMzQ5ZDUxOS1hMjA4LTQ2MWUtYTdmOC02ZTQ1NmY1MzgwNTg7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtTFh6eDkyYUpEYmU0YnBDcmF5RHo2bztsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","endpoint":"/v1/chat/completions","completion_window":"24h"}'
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDIwZGMyODgxOTA5MmY4MGFhNDc2YTg0YzIx","completion_window":"24h","created_at":1792281888,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxkMzQ5ZDUxOS1hMjA4LTQ2MWUtYTdmOC02ZTQ1NmY1MzgwNTg7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtTFh6eDkyYUpEYmU0YnBDcmF5RHo2bztsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368288,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDIwZGMyODgxOTA5MmY4MGFhNDc2YTg0YzIx -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN"
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDIwZGMyODgxOTA5MmY4MGFhNDc2YTg0YzIx","completion_window":"24h","created_at":1792281888,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxkMzQ5ZDUxOS1hMjA4LTQ2MWUtYTdmOC02ZTQ1NmY1MzgwNTg7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtTFh6eDkyYUpEYmU0YnBDcmF5RHo2bztsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"validating","cancelled_at":null,"cancelling_at":null,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368288,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDIwZGMyODgxOTA5MmY4MGFhNDc2YTg0YzIx/cancel -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN"
{"error":{"message":"Error code: 500 - {'error': {'message': 'The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID req_4fff6ea5b518450b996fe069cbacff7b in your email.)', 'type': 'server_error', 'param': None, 'code': None}}","type":"internal_server_error","param":null,"code":"500"}}
HTTP 500
$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDIwZGMyODgxOTA5MmY4MGFhNDc2YTg0YzIx/cancel -H "Authorization: Bearer $CUSTOM_AUTH_TOKEN"   (retry)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDIwZGMyODgxOTA5MmY4MGFhNDc2YTg0YzIx","completion_window":"24h","created_at":1792281888,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxkMzQ5ZDUxOS1hMjA4LTQ2MWUtYTdmOC02ZTQ1NmY1MzgwNTg7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtTFh6eDkyYUpEYmU0YnBDcmF5RHo2bztsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"cancelling","cancelled_at":null,"cancelling_at":1792281908,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368288,"failed_at":null,"finalizing_at":null,"in_progress_at":1792281889,"metadata":null,"model":"gpt-6-luna","output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

1c. Team A key downloads the finished batch's output

Commands and output

Before (b6ca57b). The team key cannot read its own finished batch, so the admin read it to get the output_file_id

$ for i in $(seq 1 80); do curl -sS http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $MASTER_KEY" | jq -r .status; sleep 15; done   (stops at the first terminal status or error)
HTTP 200, status completed, after 0s
$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $MASTER_KEY"   (admin reads the finished batch)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm","completion_window":"24h","created_at":1792282079,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCw5ZDBmOTE5YS04ZTBmLTQ3NjAtOTUwMC1jZDE5OWM0NjE3OTU7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtWDNWM3FMQ2RMQURNZG9tYVk1cDl5ajtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsOGY1YzdhYjQtM2U1My00ZWM0LThkOTEtYmU1YWRiNDhjYjky","object":"batch","status":"completed","cancelled_at":null,"cancelling_at":null,"completed_at":1792282088,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368479,"failed_at":null,"finalizing_at":1792282086,"in_progress_at":1792282080,"metadata":null,"model":"gpt-6-luna","output_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsNzIxMTI4OGYtZWRmYy01MGE4LWFiZjYtOTQ4ODc3OTRiNDM1O3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLUgyd2JORW9OVHR4OGFkS3NTMzhNYzI7bGxtX291dHB1dF9maWxlX21vZGVsX2lkLDhmNWM3YWI0LTNlNTMtNGVjNC04ZDkxLWJlNWFkYjQ4Y2I5Mg","request_counts":{"completed":1,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":15,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":11,"output_tokens":4,"input_tokens_details":{"cached_tokens":0},"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_A"   (team key, after it finished)
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl http://localhost:4000/v1/files/bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsNzIxMTI4OGYtZWRmYy01MGE4LWFiZjYtOTQ4ODc3OTRiNDM1O3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLUgyd2JORW9OVHR4OGFkS3NTMzhNYzI7bGxtX291dHB1dF9maWxlX21vZGVsX2lkLDhmNWM3YWI0LTNlNTMtNGVjNC04ZDkxLWJlNWFkYjQ4Y2I5Mg/content -H "Authorization: Bearer $KEY_A"
{"error":{"message":"User None does not have access to the file bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsNzIxMTI4OGYtZWRmYy01MGE4LWFiZjYtOTQ4ODc3OTRiNDM1O3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLUgyd2JORW9OVHR4OGFkS3NTMzhNYzI7bGxtX291dHB1dF9maWxlX21vZGVsX2lkLDhmNWM3YWI0LTNlNTMtNGVjNC04ZDkxLWJlNWFkYjQ4Y2I5Mg","type":"permission_error","param":null,"code":"403"}}
HTTP 403

After (ef9668d)

$ for i in $(seq 1 80); do curl -sS http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A" | jq -r .status; sleep 15; done   (stops at the first terminal status or error)
HTTP 200, status completed, after 1s
$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A"   (finished)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"completed","cancelled_at":null,"cancelling_at":null,"completed_at":1792281905,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":1792281904,"in_progress_at":1792281886,"metadata":null,"model":"gpt-6-luna","output_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsYjk3MmU1M2EtMDIxOC01NmQ0LTgwOWYtMzM0OWJkNGRhMTIzO3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLTd1VUVleTRTUEM5QlRuZGlQdFRoRk07bGxtX291dHB1dF9maWxlX21vZGVsX2lkLGVmYmM3MmZkLTk0YzEtNGUyZC04N2Q3LWVlZGEyNjIyMDcxOQ","request_counts":{"completed":1,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":15,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":11,"output_tokens":4,"input_tokens_details":{"cached_tokens":0},"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/files/bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsYjk3MmU1M2EtMDIxOC01NmQ0LTgwOWYtMzM0OWJkNGRhMTIzO3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLTd1VUVleTRTUEM5QlRuZGlQdFRoRk07bGxtX291dHB1dF9maWxlX21vZGVsX2lkLGVmYmM3MmZkLTk0YzEtNGUyZC04N2Q3LWVlZGEyNjIyMDcxOQ/content -H "Authorization: Bearer $KEY_A"
{"id": "batch_req_6ad40d31522c81909b75aa677a02dc8f", "custom_id": "req-1", "response": {"status_code": 200, "request_id": "4d6e17cb-ac44-4ad0-8b6e-b5815dc9eafe", "body": {"id": "chatcmpl-Ea8gSZRzWn1RDJEBjMLP2o0xGLzAK", "object": "chat.completion", "created": 1792281896, "model": "gpt-6-luna", "choices": [{"index": 0, "message": {"role": "assistant", "content": "Hi", "refusal": null, "annotations": []}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 11, "completion_tokens": 4, "total_tokens": 15, "prompt_tokens_details": {"cached_tokens": 0, "cache_write_tokens": 0, "audio_tokens": 0}, "completion_tokens_details": {"reasoning_tokens": 0, "audio_tokens": 0, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0}}, "service_tier": "default", "system_fingerprint": null}}, "error": null}

HTTP 200

2. Team B key on team A's batches

Commands and output

Before (b6ca57b)

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_B"
{"error":{"message":"User None does not have access to the object bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm","type":"internal_server_error","param":null,"code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwMGIxMDgxOTBiYzY2MDI2MjNkZmM3MGUy/cancel -H "Authorization: Bearer $KEY_B"
{"error":{"message":"User None does not have access to the object bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwMGIxMDgxOTBiYzY2MDI2MjNkZmM3MGUy","type":"internal_server_error","param":null,"code":"403"}}
HTTP 403

After (ef9668d)

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_B"
{"error":{"message":"User None does not have access to the object bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","type":"internal_server_error","param":null,"code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh/cancel -H "Authorization: Bearer $KEY_B"
{"error":{"message":"User None does not have access to the object bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh","type":"internal_server_error","param":null,"code":"403"}}
HTTP 403

2b. Direct chat call that names team A's internal deployment name

Commands and output

Before (b6ca57b)

$ curl http://localhost:4000/v1/chat/completions -H "Authorization: Bearer $KEY_A" -H 'Content-Type: application/json' -d '{"model":"model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9","messages":[{"role":"user","content":"Say hi in one word"}]}'
{"id":"chatcmpl-Ea8jRVumnlfgCxuqkrowuBpHiMXmn","created":1792282081,"model":"model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hi","role":"assistant","annotations":[],"refusal":null},"provider_specific_fields":{}}],"usage":{"completion_tokens":17,"prompt_tokens":11,"total_tokens":28,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":7,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0,"cache_write_tokens":0,"cache_creation_tokens":0}},"service_tier":"default","system_fingerprint":null}
HTTP 200

$ curl http://localhost:4000/v1/chat/completions -H "Authorization: Bearer $KEY_B" -H 'Content-Type: application/json' -d '{"model":"model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9","messages":[{"role":"user","content":"Say hi in one word"}]}'
{"error":{"message":"litellm.BadRequestError: You passed in model=model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9. There are no healthy deployments for this model\n\nLiteLLM: model group 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

After (ef9668d)

$ curl http://localhost:4000/v1/chat/completions -H "Authorization: Bearer $KEY_A" -H 'Content-Type: application/json' -d '{"model":"model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4","messages":[{"role":"user","content":"Say hi in one word"}]}'
{"id":"chatcmpl-Ea8h2ykJWovIHRj2aREvt4b8g0nyu","created":1792281932,"model":"model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hi","role":"assistant","annotations":[],"refusal":null},"provider_specific_fields":{}}],"usage":{"completion_tokens":4,"prompt_tokens":11,"total_tokens":15,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0,"cache_write_tokens":0,"cache_creation_tokens":0}},"service_tier":"default","system_fingerprint":null}
HTTP 200

$ curl http://localhost:4000/v1/chat/completions -H "Authorization: Bearer $KEY_B" -H 'Content-Type: application/json' -d '{"model":"model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4","messages":[{"role":"user","content":"Say hi in one word"}]}'
{"error":{"message":"litellm.BadRequestError: You passed in model=model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4. There are no healthy deployments for this model\n\nLiteLLM: model group 'model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

3. Team A key limited to another model

Commands and output

Before (b6ca57b)

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_A_OTHER"
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwMGIxMDgxOTBiYzY2MDI2MjNkZmM3MGUy/cancel -H "Authorization: Bearer $KEY_A_OTHER"
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

After (ef9668d)

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A_OTHER"
{"error":{"message":"The requested model 'model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh/cancel -H "Authorization: Bearer $KEY_A_OTHER"
{"error":{"message":"The requested model 'model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

3b. Team A also carries a legacy team alias that points at its internal deployment name

Commands and output

Before (b6ca57b)

$ curl -X POST http://localhost:4000/team/update -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-a","models":["team-batch-model","gpt-6-luna","legacy-team-model"],"model_aliases":{"legacy-team-model":"model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9"}}'
{"team_id":"qa47067-base-team-a","data":{"team_id":"qa47067-base-team-a","team_alias":null,"organization_id":null,"object_permission_id":null,"admins":[],"members":[],"members_with_roles":[{"role":"admin","user_id":"default_user_id","user_email":null}],"metadata":{},"max_budget":null,"soft_budget":null,"spend":5.15e-05,"models":["team-batch-model","gpt-6-luna","legacy-team-model"],"max_parallel_requests":null,"tpm_limit":null,"rpm_limit":null,"tpd_limit":null,"budget_duration":null,"budget_reset_at":null,"blocked":false,"created_at":"2026-10-18T00:07:12.027000Z","updated_at":"2026-10-18T00:08:14.569000Z","model_spend":{},"model_max_budget":{},"router_settings":{},"team_member_permissions":[],"access_group_ids":[],"policies":[],"default_team_member_models":[],"budget_limits":null,"model_id":1,"allow_team_guardrail_config":false,"litellm_organization_table":null,"litellm_model_table":{"id":1,"model_aliases":{"legacy-team-model":"model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9"},"created_at":"2026-10-18T00:08:14.464000Z","created_by":"default_user_id","updated_at":"2026-10-18T00:08:14.464000Z","updated_by":"default_user_id","team":null},"object_permission":null,"projects":null}}
HTTP 200
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-a","models":["gpt-6-luna"]}'   -> saved as $KEY_A_OTHER2
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-base-team-a","models":["legacy-team-model"]}'   -> saved as $KEY_A_ALIAS

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_A_OTHER2"   (team A key granted only gpt-6-luna)
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGUwMGIxMDgxOTBiYzY2MDI2MjNkZmM3MGUy/cancel -H "Authorization: Bearer $KEY_A_OTHER2"
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDo4ZjVjN2FiNC0zZTUzLTRlYzQtOGQ5MS1iZTVhZGI0OGNiOTI7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZGRmOGU4ODgxOTA5NWFmNDE4ZDcxYWJlYjZm -H "Authorization: Bearer $KEY_A_ALIAS"   (team A key granted only the alias name)
{"error":{"message":"The requested model 'model_name_qa47067-base-team-a_0229495c-f33c-4c63-a52e-086e203d60a9' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

After (ef9668d)

$ curl -X POST http://localhost:4000/team/update -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-a","models":["team-batch-model","gpt-6-luna","legacy-team-model"],"model_aliases":{"legacy-team-model":"model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4"}}'
{"team_id":"qa47067-head-team-a","data":{"team_id":"qa47067-head-team-a","team_alias":null,"organization_id":null,"object_permission_id":null,"admins":[],"members":[],"members_with_roles":[{"role":"admin","user_id":"default_user_id","user_email":null}],"metadata":{},"max_budget":null,"soft_budget":null,"spend":1.94e-05,"models":["team-batch-model","gpt-6-luna","legacy-team-model"],"max_parallel_requests":null,"tpm_limit":null,"rpm_limit":null,"tpd_limit":null,"budget_duration":null,"budget_reset_at":null,"blocked":false,"created_at":"2026-10-18T00:04:11.011000Z","updated_at":"2026-10-18T00:05:34.485000Z","model_spend":{},"model_max_budget":{},"router_settings":{},"team_member_permissions":[],"access_group_ids":[],"policies":[],"default_team_member_models":[],"budget_limits":null,"model_id":1,"allow_team_guardrail_config":false,"litellm_organization_table":null,"litellm_model_table":{"id":1,"model_aliases":{"legacy-team-model":"model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4"},"created_at":"2026-10-18T00:05:34.474000Z","created_by":"default_user_id","updated_at":"2026-10-18T00:05:34.474000Z","updated_by":"default_user_id","team":null},"object_permission":null,"projects":null}}
HTTP 200
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-a","models":["gpt-6-luna"]}'   -> saved as $KEY_A_OTHER2
$ curl -X POST http://localhost:4000/key/generate -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' -d '{"team_id":"qa47067-head-team-a","models":["legacy-team-model"]}'   -> saved as $KEY_A_ALIAS

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A_OTHER2"   (team A key granted only gpt-6-luna)
{"error":{"message":"The requested model 'model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh/cancel -H "Authorization: Bearer $KEY_A_OTHER2"
{"error":{"message":"The requested model 'model_name_qa47067-head-team-a_4b5bb7ff-1afe-4c79-aa98-1bd27e60b3a4' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"key_model_access_denied","param":"model","code":"403"}}
HTTP 403

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A_ALIAS"   (team A key granted only the alias name)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"completed","cancelled_at":null,"cancelling_at":null,"completed_at":1792281905,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":1792281904,"in_progress_at":1792281886,"metadata":null,"model":"gpt-6-luna","output_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsYjk3MmU1M2EtMDIxOC01NmQ0LTgwOWYtMzM0OWJkNGRhMTIzO3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLTd1VUVleTRTUEM5QlRuZGlQdFRoRk07bGxtX291dHB1dF9maWxlX21vZGVsX2lkLGVmYmM3MmZkLTk0YzEtNGUyZC04N2Q3LWVlZGEyNjIyMDcxOQ","request_counts":{"completed":1,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":15,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":11,"output_tokens":4,"input_tokens_details":{"cached_tokens":0},"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

Previous PR commit d4460ac, booted against the after leg's database and replaying the same calls with the same keys. Both limited keys get through, which the newest commit closes

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A_OTHER2"   (team A key granted only gpt-6-luna)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"completed","cancelled_at":null,"cancelling_at":null,"completed_at":1792281905,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":1792281904,"in_progress_at":1792281886,"metadata":null,"model":"gpt-6-luna","output_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsYjk3MmU1M2EtMDIxOC01NmQ0LTgwOWYtMzM0OWJkNGRhMTIzO3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLTd1VUVleTRTUEM5QlRuZGlQdFRoRk07bGxtX291dHB1dF9maWxlX21vZGVsX2lkLGVmYmM3MmZkLTk0YzEtNGUyZC04N2Q3LWVlZGEyNjIyMDcxOQ","request_counts":{"completed":1,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":15,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":11,"output_tokens":4,"input_tokens_details":{"cached_tokens":0},"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl -X POST http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh/cancel -H "Authorization: Bearer $KEY_A_OTHER2"
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFmNTBkMDgxOTA4ODIwZWIxMjAzMDI5MWNh","completion_window":"24h","created_at":1792281887,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"cancelling","cancelled_at":null,"cancelling_at":1792281887,"completed_at":null,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368287,"failed_at":null,"finalizing_at":null,"in_progress_at":null,"metadata":null,"model":null,"output_file_id":null,"request_counts":{"completed":0,"failed":0,"total":0},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":0,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A_ALIAS"   (team A key granted only the alias name)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"completed","cancelled_at":null,"cancelling_at":null,"completed_at":1792281905,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":1792281904,"in_progress_at":1792281886,"metadata":null,"model":"gpt-6-luna","output_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsYjk3MmU1M2EtMDIxOC01NmQ0LTgwOWYtMzM0OWJkNGRhMTIzO3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLTd1VUVleTRTUEM5QlRuZGlQdFRoRk07bGxtX291dHB1dF9maWxlX21vZGVsX2lkLGVmYmM3MmZkLTk0YzEtNGUyZC04N2Q3LWVlZGEyNjIyMDcxOQ","request_counts":{"completed":1,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":15,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":11,"output_tokens":4,"input_tokens_details":{"cached_tokens":0},"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

$ curl http://localhost:4000/v1/batches/bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3 -H "Authorization: Bearer $KEY_A_OTHER"   (team A key granted only gpt-6-luna, no alias in its models)
{"id":"bGl0ZWxsbV9wcm94eTttb2RlbF9pZDplZmJjNzJmZC05NGMxLTRlMmQtODdkNy1lZWRhMjYyMjA3MTk7bGxtX2JhdGNoX2lkOmJhdGNoXzZhZDQwZDFkZjJhYzgxOTBiYThkNTYwYTlkMWZlNzU3","completion_window":"24h","created_at":1792281885,"endpoint":"/v1/chat/completions","input_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxiMDQxNWUxMi01ZWU5LTQzYzgtODMzNy1lY2U3ZjgwYTIwY2Q7dGFyZ2V0X21vZGVsX25hbWVzLHRlYW0tYmF0Y2gtbW9kZWw7bGxtX291dHB1dF9maWxlX2lkLGZpbGUtS21SdnNCV1BycVV0R0ZTdktodWRQWjtsbG1fb3V0cHV0X2ZpbGVfbW9kZWxfaWQsZWZiYzcyZmQtOTRjMS00ZTJkLTg3ZDctZWVkYTI2MjIwNzE5","object":"batch","status":"completed","cancelled_at":null,"cancelling_at":null,"completed_at":1792281905,"error_file_id":null,"errors":null,"expired_at":null,"expires_at":1792368285,"failed_at":null,"finalizing_at":1792281904,"in_progress_at":1792281886,"metadata":null,"model":"gpt-6-luna","output_file_id":"bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9qc29uO3VuaWZpZWRfaWQsYjk3MmU1M2EtMDIxOC01NmQ0LTgwOWYtMzM0OWJkNGRhMTIzO3RhcmdldF9tb2RlbF9uYW1lcyx0ZWFtLWJhdGNoLW1vZGVsO2xsbV9vdXRwdXRfZmlsZV9pZCxmaWxlLTd1VUVleTRTUEM5QlRuZGlQdFRoRk07bGxtX291dHB1dF9maWxlX21vZGVsX2lkLGVmYmM3MmZkLTk0YzEtNGUyZC04N2Q3LWVlZGEyNjIyMDcxOQ","request_counts":{"completed":1,"failed":0,"total":1},"usage":{"completion_tokens":0,"prompt_tokens":0,"total_tokens":15,"completion_tokens_details":null,"prompt_tokens_details":null,"input_tokens":11,"output_tokens":4,"input_tokens_details":{"cached_tokens":0},"output_tokens_details":{"reasoning_tokens":0}}}
HTTP 200

Notes from the run

  • Cross-team 403 comes from the ownership check, PR leaves it
  • That 403 carries type internal_server_error, PR leaves it alone
  • Internal-name chat was already 200 on base, PR changes nothing
  • Second worker misses new team models for about 15s, predates PR
  • One upstream OpenAI 500 on cancel, the retry passed
  • Base download got permission_error after an admin read the batch
  • Head download used the team key throughout and returned 200
  • Commit d4460ac let limited keys read batches, head fixes it

Type

🐛 Bug Fix

Caveats (if any)

Low

  • Video ids share the changed check but have no test or live run

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

… retrieve/cancel

A unified batch id resolves to the deployment's internal model_name
(model_name_{team_id}_{uuid}), which is in no key or team allowlist, so
authorize_model_for_key always denied and team keys got 403 retrieving or
cancelling their own batches. Authorize against model_info
team_public_model_name when the resolved deployment is team-scoped, falling
back to the resolved name otherwise.

Fixes BerriAI#46958
@codspeed

codspeed Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 32 untouched benchmarks


Comparing Mrun25:fix/batch-retrieve-team-model-403-46958 (ef9668d) with main (c58fc0c)

Open in CodSpeed

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mateo-berri

Copy link
Copy Markdown
Contributor

@Mrun25 thanks for this. I pushed a commit that covers the second auth path. Could you mark the PR ready for review

@mateo-berri

Copy link
Copy Markdown
Contributor

@litereview code-review

@litereview

litereview Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

✅ code-review

5/5 · Ready for human review

Scope: full · Full PR review.

No correctness findings.

Checks and execution details
  • Passed · Real testing evidence (required): Not applicable: no LLM translation changes in the scoped paths. The PR changes only litellm/proxy/auth/auth_checks.py and two files under tests/unit/proxy/. Nothing changed under litellm/llms/** or litellm/litellm_core_utils/prompt_templates/**.
  • Passed · Compatibility requirements (required): No supported behavior breaks. _can_object_call_model adds an allow path that runs only after the existing potential_models checks have already denied the request. Teams that previously passed still pass: the test owning-team-key-granted-the-internal-name covers the internal-name grant, and legacy-team-model-reached-through-a-team-alias covers the alias grant. The only change is that a request for model_name_&lt;team_id>_&lt;uuid> from the owning team, with the public name or a team alias granted, now gets 200 instead of 403. That widens access, and the PR description declares it as intended. No previously successful input is now rejected, so the PR does not need a ! marker.
  • Passed · Changed behavior and result consistency (required): Read the repository guidance for the touched paths: root AGENTS.md, tests/AGENTS.md and tests/unit/AGENTS.md.

Traced callers of the new branch:

  • can_key_call_model, which also covers its access-group fallback
  • the team-models and member allowed_models checks in user_api_key_auth.py
  • can_project_access_model, which receives the project's team_id
  • the agent paths

can_user_call_model and can_customer_access_model pass no team_id, so their behavior does not change.

Boundary cases checked:

  • Team ID prefix collision: for team-a against model_name_team-a_ml_..., the string prefix matches. The deployment.model_info.team_id == team_id guard rejects the request, and a test covers it.
  • Other team, same public name: the request is rejected, and a test covers it.
  • No team_public_model_name: only the team's own aliases that point at the internal name apply.
  • Key alias applied: the new path is skipped.
  • llm_router or team_id is None: the helper returns no names.

Tests run: uv run pytest tests/unit/proxy/auth/test_auth_utils.py tests/unit/proxy/batches_endpoints/test_endpoints.py gave 741 passed and 4 failed. All new tests passed. The 4 failures are the unchanged test_create__*ownership* tests. They fail with ImportError: cannot import name 'Json' from 'prisma' in enterprise/.../managed_files.py:638. That is a sandbox problem (the Prisma client was not generated), and none of those tests exercise the changed code.

  • Passed · Targeted unit tests for changed auth path (optional): These new tests pass locally: test_team_scoped_managed_ids_authorize_only_the_owning_team_by_public_name, which covers batch, cancel, fine-tuning, vector store and character IDs, plus the legacy-alias test and the retrieve/cancel harness tests in test_endpoints.py. Video IDs have no dedicated test. The PR caveats already say so, and video IDs go through the same shared function.

View review · Reviewed ef9668d7f55f

…loyment on every auth path

Managed batch, file, fine-tuning, vector store, character and video ids resolve to the
team deployment's internal name again, so teams that granted the internal name keep access.
The model access check now also accepts the owning team's public name and its legacy team
aliases for that internal name, and only when the caller's team owns the deployment.
@mateo-berri

Copy link
Copy Markdown
Contributor

@litereview code-review

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge, with all previous findings addressed or withdrawn

Summary

The PR lets the owning team use a deployment’s public name or granted team alias when checking access to managed resources

The latest change removes the alias shortcut from those added names and adds a restricted-key regression test. No new actionable issues were found

Greptile withdrew the mock-router finding after mateo-berri explained that the endpoint tests use the established harness while separate tests cover real Router lookups

  • Team model checks accept the owning team's public name for internal deployment names.

Reviews (2) · Last reviewed commit: "fix(proxy): match a team deployment's pu..." · Reviewed by Greptile

Comment on lines +4820 to +4821
legacy_aliases: Final = tuple(alias for alias, target in (team_model_aliases or {}).items() if target == model)
return (*((public_name,) if public_name else ()), *legacy_aliases)

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.

P1 security Aliases bypass key grants

A key restricted to another model can now access a legacy team deployment by its internal name. The new legacy_aliases candidate reaches _model_in_team_aliases, which returns True without checking models. This lets the key read or cancel batches that its model grants exclude. Match these added names against the key’s grants without that shortcut, and add a restricted-key regression test.

How this was verified: can_key_call_model supplies both the restricted grants and the team aliases, and alias membership returns before the grant check

Knowledge Base Used: Proxy authentication and authorization

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.

Fixed in ef9668d. Legacy alias names now skip the team-alias shortcut and only match grants the key actually holds, with a regression test

Comment on lines +1570 to +1574
async def test_team_scoped_managed_ids_authorize_only_the_owning_team_by_public_name(route, request_data):
from litellm.proxy._types import ProxyException
from litellm.proxy.auth.auth_checks import can_key_call_resolved_model

llm_router = _team_scoped_router()

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.

P2 New tests omit required types

The new tests omit parameter types, return types, and Final on local variables. AGENTS.md requires fully typed functions and Final variables. The same pattern appears in the new batch endpoint tests. Add the required annotations throughout the new tests before merging

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

Fixed in ef9668d. The new tests and helpers now carry full parameter and return types, and module constants are annotated Final

@mateo-berri

Copy link
Copy Markdown
Contributor

@litereview code-review

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ef9668d. Configure here.

@mateo-berri mateo-berri left a comment

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.

LGTM. Thanks for the contribution!

@mateo-berri

Copy link
Copy Markdown
Contributor

@Mrun25 this is approved and every required check passes. Please mark it ready for review and I will merge it right away

@Mrun25
Mrun25 marked this pull request as ready for review October 18, 2026 02:50
Copilot AI balanced review requested due to automatic review settings October 18, 2026 02:50

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mateo-berri
mateo-berri merged commit e979bd0 into BerriAI:main Oct 18, 2026
91 of 93 checks passed
mateo-berri added a commit that referenced this pull request Oct 19, 2026
The tests picked from #47067 annotate module constants with Final, which main's copy imports and this line's did not, so the module failed to import on Python 3.12.
mateo-berri added a commit that referenced this pull request Oct 19, 2026
…1_104_x

fix(proxy): backport #47067 team-scoped batch model access to stable/1.104.x for v1.104.4
rogerrum pushed a commit to rogerrum/k8s-gitops that referenced this pull request Oct 25, 2026
….106.4 ) (#3677)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | minor | `v1.105.1` → `v1.106.4` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/3566) for more information.

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.106.4`](https://github.com/BerriAI/litellm/releases/tag/v1.106.4)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.106.3...v1.106.4)

#### Verify this release

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.4
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.106.4

3 PRs. 2 fixed. No action needed to upgrade

##### Changes

- **Deployment:** Fixed the proxy sometimes exiting on startup with an `ImportError` when it cannot reach the remote model cost map, broken since v1.104.0 ([#&#8203;46711](https://github.com/BerriAI/litellm/issues/46711)) <sup>Also in [1.104.7](https://github.com/BerriAI/litellm/releases/tag/v1.104.7), [1.105.5](https://github.com/BerriAI/litellm/releases/tag/v1.105.5)</sup>
- **Deployment:** Fixed image scans flagging brotli 1.2.0, the emSign ECC Root CA - G3 and unused lockfile packages ([#&#8203;48283](https://github.com/BerriAI/litellm/issues/48283), [#&#8203;48300](https://github.com/BerriAI/litellm/issues/48300))

***

Backport [#&#8203;48294](https://github.com/BerriAI/litellm/issues/48294) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.106.3...v1.106.4)

### [`v1.106.3`](https://github.com/BerriAI/litellm/releases/tag/v1.106.3)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.106.2...v1.106.3)

> \[!IMPORTANT]
> **The image-signing key has changed.** Starting with this release, every Docker image and Helm chart is signed with the new cosign key from commit [`e82a3c6`](https://github.com/BerriAI/litellm/commit/e82a3c646908ba0a6ee0beddc4310d7a6cac4065). Verifying with the previous key from commit `0112e53` will fail.
>
> Update anything that pins the old `cosign.pub`: `cosign verify` scripts, CI checks, and admission policies such as Kyverno, Sigstore policy-controller or Connaisseur.
>
> New `cosign.pub` SHA-256: `e3fe3e08c44b16407fe0b37c43b4f8b603b3a0f4ee74c29e647bc022d762c2c0`

#### Verify this release

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.3
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.106.3

4 PRs. 1 changed, 1 removed. 1 needs action

##### Action required

- **Deployment:** Verify image signatures with the `cosign.pub` from commit `e82a3c6`, the previous key no longer matches ([#&#8203;48103](https://github.com/BerriAI/litellm/issues/48103)) <sup>Also in [1.103.8](https://github.com/BerriAI/litellm/releases/tag/v1.103.8), [1.104.6](https://github.com/BerriAI/litellm/releases/tag/v1.104.6), [1.105.4](https://github.com/BerriAI/litellm/releases/tag/v1.105.4)</sup>

##### Changes

- **Deployment:** Removed the eMudhra root CA from every certificate bundle the SDK, proxy and Docker images trust ([#&#8203;47670](https://github.com/BerriAI/litellm/issues/47670), [#&#8203;47969](https://github.com/BerriAI/litellm/issues/47969), [#&#8203;48139](https://github.com/BerriAI/litellm/issues/48139)) <sup>Also in [1.103.8](https://github.com/BerriAI/litellm/releases/tag/v1.103.8), [1.104.6](https://github.com/BerriAI/litellm/releases/tag/v1.104.6), [1.105.4](https://github.com/BerriAI/litellm/releases/tag/v1.105.4)</sup>
- **Deployment:** Changed the cosign key that signs Docker images and Helm charts to the one from commit `e82a3c6` ([#&#8203;48103](https://github.com/BerriAI/litellm/issues/48103)) <sup>Also in [1.103.8](https://github.com/BerriAI/litellm/releases/tag/v1.103.8), [1.104.6](https://github.com/BerriAI/litellm/releases/tag/v1.104.6), [1.105.4](https://github.com/BerriAI/litellm/releases/tag/v1.105.4)</sup>

***

Backport [#&#8203;48078](https://github.com/BerriAI/litellm/issues/48078) · Backport [#&#8203;48142](https://github.com/BerriAI/litellm/issues/48142) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.106.2...v1.106.3)

### [`v1.106.2`](https://github.com/BerriAI/litellm/releases/tag/v1.106.2)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.106.1...v1.106.2)

#### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](https://github.com/BerriAI/litellm/commit/0112e53046018d726492c814b3644b7d376029d0).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.106.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

#### What's Changed

- fix(count_tokens): backport Bedrock Mantle 404 fallback to stable/1.106.x by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;47742](https://github.com/BerriAI/litellm/pull/47742)
- fix(batches)!: backport P0 batch-cost, pricing and translation fixes to stable/1.106.x for v1.106.2 by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;47736](https://github.com/BerriAI/litellm/pull/47736)
- fix(proxy): backport LIT-145 spend and cost fixes to stable/1.106.x for v1.106.2 by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;47695](https://github.com/BerriAI/litellm/pull/47695)

**Full Changelog**: <https://github.com/BerriAI/litellm/compare/v1.106.1...v1.106.2>

### [`v1.106.1`](https://github.com/BerriAI/litellm/releases/tag/v1.106.1)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.106.0...v1.106.1)

#### Verify this release

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.1
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.106.1

9 PRs. 6 fixed. 1 needs action

##### Action required

- **Vector stores:** Run `db_scripts/strip_vector_store_internal_metadata.py` to fix stores created before this release ([#&#8203;47021](https://github.com/BerriAI/litellm/issues/47021))

##### Changes

- **Anthropic:** Fixed signed thinking blocks and `thinking.block_binding` being dropped on multi-turn requests ([#&#8203;41362](https://github.com/BerriAI/litellm/issues/41362), [#&#8203;46342](https://github.com/BerriAI/litellm/issues/46342)) <sup>Also in [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **Chat completions:** Fixed tool calls landing on `choices[1]` with gpt-5.4+ models, broken since v1.97.0 ([#&#8203;46099](https://github.com/BerriAI/litellm/issues/46099)) <sup>Also in [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **Batches and files:** Fixed 403 when team keys retrieve, cancel or download their own batches ([#&#8203;47067](https://github.com/BerriAI/litellm/issues/47067)) <sup>Also in [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **Vector stores:** Fixed HTTP 400 on metadata updates caused by keys the proxy added to the store ([#&#8203;47021](https://github.com/BerriAI/litellm/issues/47021))
- **Token counting:** Fixed undercounted PDFs, system prompts and tools, and rejected Google `countTokens` requests ([#&#8203;47389](https://github.com/BerriAI/litellm/issues/47389), [#&#8203;47446](https://github.com/BerriAI/litellm/issues/47446), [#&#8203;47454](https://github.com/BerriAI/litellm/issues/47454)) <sup>Also in [1.104.4](https://github.com/BerriAI/litellm/releases/tag/v1.104.4), [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **MCP:** Fixed `Tool not found` when calling a bare tool name on `/{server}/mcp`, broken since v1.103.0 ([#&#8203;46225](https://github.com/BerriAI/litellm/issues/46225))

***

Backport [#&#8203;47517](https://github.com/BerriAI/litellm/issues/47517) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.106.0...v1.106.1)

### [`v1.106.0`](https://github.com/BerriAI/litellm/releases/tag/v1.106.0)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.105.5...v1.106.0)

#### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](https://github.com/BerriAI/litellm/commit/0112e53046018d726492c814b3644b7d376029d0).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.0
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.106.0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.0
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

#### What's Changed

- test(mcp): fire MCP client test deadlines on conditions instead of wall-clock time by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44166](https://github.com/BerriAI/litellm/pull/44166)
- fix(cost-map): add OpenAI TTS and GPT-5.x deprecation dates by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44175](https://github.com/BerriAI/litellm/pull/44175)
- fix(tracing): unify ClickHouse storage configuration by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;43941](https://github.com/BerriAI/litellm/pull/43941)
- feat(docker): one-command quickstart that starts the gateway, Postgres, and the admin UI by [@&#8203;misbahsy](https://github.com/misbahsy) in [#&#8203;43673](https://github.com/BerriAI/litellm/pull/43673)
- fix(lens): simplify the example investigation preview by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44123](https://github.com/BerriAI/litellm/pull/44123)
- chore(helm): drop migrationJob values the chart never reads by [@&#8203;Bernedotcom2312](https://github.com/Bernedotcom2312) in [#&#8203;42141](https://github.com/BerriAI/litellm/pull/42141)
- fix(ui): register tencent in the Add Model provider dropdown by [@&#8203;jimaldon](https://github.com/jimaldon) in [#&#8203;40924](https://github.com/BerriAI/litellm/pull/40924)
- test: remove 130 legacy tests owned by stronger unit proofs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44157](https://github.com/BerriAI/litellm/pull/44157)
- feat(mcp)!: disable stdio MCP servers by default by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44066](https://github.com/BerriAI/litellm/pull/44066)
- fix(proxy): exit when DATABASE_URL is set but the Prisma toolchain is missing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44207](https://github.com/BerriAI/litellm/pull/44207)
- fix(proxy): preserve lifespan state across all entrypoints by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44214](https://github.com/BerriAI/litellm/pull/44214)
- fix(oci): resolve the GenAI endpoint realm from the compartment OCID instead of hardcoding oraclecloud.com by [@&#8203;fede-kamel](https://github.com/fede-kamel) in [#&#8203;43180](https://github.com/BerriAI/litellm/pull/43180)
- fix(chatgpt): preserve requested service tier in Responses calls by [@&#8203;SteffanWolter](https://github.com/SteffanWolter) in [#&#8203;40108](https://github.com/BerriAI/litellm/pull/40108)
- fix(ui): leave unset callback select params out of the save payload by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44213](https://github.com/BerriAI/litellm/pull/44213)
- fix(proxy-extras): hand libpq a root cert, not Prisma's sslcert, when the migration job builds indexes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44203](https://github.com/BerriAI/litellm/pull/44203)
- feat: add Laya gateway and OSS classifier providers by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;43626](https://github.com/BerriAI/litellm/pull/43626)
- fix(auto-router): count usage savings by selected UTC request day by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44115](https://github.com/BerriAI/litellm/pull/44115)
- fix(lens): preserve framework agent names and GenAI message content by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44218](https://github.com/BerriAI/litellm/pull/44218)
- feat(jwt): auto_register_map_existing_key maps JWT to the user's existing virtual key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;42375](https://github.com/BerriAI/litellm/pull/42375)
- feat(ui): select Laya for OSS classification by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;43768](https://github.com/BerriAI/litellm/pull/43768)
- fix(otel): tolerate non-dict callback_settings.otel and ignore bare EXCLUDED_SERVICES env by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44086](https://github.com/BerriAI/litellm/pull/44086)
- fix(proxy): carry key, team and project tags into pass-through spend logs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;42662](https://github.com/BerriAI/litellm/pull/42662)
- feat(ui): add System One (Jev) tab to the playground by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44043](https://github.com/BerriAI/litellm/pull/44043)
- chore: bump litellm-proxy-extras 0.4.104 -> 0.4.105 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44234](https://github.com/BerriAI/litellm/pull/44234)
- chore(prices): add xAI grok-voice-transcribe-1.0 deprecation date by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44237](https://github.com/BerriAI/litellm/pull/44237)
- fix(exa): fall back to highlights/summary when text is missing by [@&#8203;wakqasahmed](https://github.com/wakqasahmed) in [#&#8203;42213](https://github.com/BerriAI/litellm/pull/42213)
- fix(scim): apply path-less group PATCH ops instead of storing them under an empty metadata key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43978](https://github.com/BerriAI/litellm/pull/43978)
- fix(lens): run investigations with configured wildcard models by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44233](https://github.com/BerriAI/litellm/pull/44233)
- fix(ui): shrink the sidebar logo so it stops outweighing page titles by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44247](https://github.com/BerriAI/litellm/pull/44247)
- feat(tracing): support claude agent sdk traces with agent name, logo and chat content by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44248](https://github.com/BerriAI/litellm/pull/44248)
- fix(ui): make model leaderboard chart bars wide and readable by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44249](https://github.com/BerriAI/litellm/pull/44249)
- test: repair stale and polluting tests red on scheduled main CI by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44229](https://github.com/BerriAI/litellm/pull/44229)
- feat(traces): type queries and align read access with log visibility by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;44228](https://github.com/BerriAI/litellm/pull/44228)
- chore(ui): untrack tsconfig.tsbuildinfo and gitignore \*.tsbuildinfo by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44261](https://github.com/BerriAI/litellm/pull/44261)
- refactor(mcp): extract upstream preparation and support modern clients by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;44232](https://github.com/BerriAI/litellm/pull/44232)
- fix(lens): default to traces and reopen span details by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44260](https://github.com/BerriAI/litellm/pull/44260)
- fix(bedrock): surface unrecognized converse-stream event frames instead of an empty turn by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44112](https://github.com/BerriAI/litellm/pull/44112)
- perf(proxy): batch daily model usage writes instead of upserting per request by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44243](https://github.com/BerriAI/litellm/pull/44243)
- test(integration): opt the config pass-through spend-log case into auth by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44265](https://github.com/BerriAI/litellm/pull/44265)
- test: fix three order-dependent and timing-flaky tests by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44271](https://github.com/BerriAI/litellm/pull/44271)
- fix(ui): make the Lens traces refresh button always clickable by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44252](https://github.com/BerriAI/litellm/pull/44252)
- feat(lens): add sample previews and improve setup and worker feedback by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44268](https://github.com/BerriAI/litellm/pull/44268)
- chore(openrouter): sync prices, limits and deprecation dates from the models API by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44287](https://github.com/BerriAI/litellm/pull/44287)
- refactor(traces): type the ClickHouse query help response by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44285](https://github.com/BerriAI/litellm/pull/44285)
- fix(proxy): stop queued registry read-throughs spending the resync budget by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44277](https://github.com/BerriAI/litellm/pull/44277)
- feat(lens): show investigation progress as one staged bar with time left by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44301](https://github.com/BerriAI/litellm/pull/44301)
- refactor(ui): compose dashboard pages with shared layouts by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44306](https://github.com/BerriAI/litellm/pull/44306)
- fix(proxy): share ownership permissions for spend logs and traces by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;44239](https://github.com/BerriAI/litellm/pull/44239)
- fix(proxy-extras): retry P3009 when a peer already recovered the named migration row by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44283](https://github.com/BerriAI/litellm/pull/44283)
- fix(bedrock): price amazon nova 2 pro preview at the standard tier by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44302](https://github.com/BerriAI/litellm/pull/44302)
- feat: add Bespoke Nimble gateway and OSS classifier support by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44246](https://github.com/BerriAI/litellm/pull/44246)
- fix(anthropic): stop repeating streamed thinking text in the signature chunk by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44127](https://github.com/BerriAI/litellm/pull/44127)
- fix(responses): drop bridge-minted reasoning items from OpenAI replays by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44132](https://github.com/BerriAI/litellm/pull/44132)
- feat(bedrock): drop lookaround regex patterns from tool schemas for Converse models that reject them by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44138](https://github.com/BerriAI/litellm/pull/44138)
- feat(bedrock): serve gpt-5.6+ chat completions natively by default, with chat_completions/ opt-in for gpt-oss and grok by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44307](https://github.com/BerriAI/litellm/pull/44307)
- feat(lens): issue briefs with problem, user goal, outcome and test cases by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44311](https://github.com/BerriAI/litellm/pull/44311)
- fix(responses): keep gpt-5.4/5.5 tool calls on chat and merge bridged tool calls into one choice by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44295](https://github.com/BerriAI/litellm/pull/44295)
- fix(cost): price rule-only model names at the deployment's rate by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44144](https://github.com/BerriAI/litellm/pull/44144)
- fix(auto-router): attribute router-day savings without spend logs or a session by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44226](https://github.com/BerriAI/litellm/pull/44226)
- test(integration): let run.py select cells by pytest node id by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44319](https://github.com/BerriAI/litellm/pull/44319)
- fix(bedrock): honor unsupported reasoning effort levels for OpenAI GPT models by [@&#8203;Aasif-Multani](https://github.com/Aasif-Multani) in [#&#8203;44183](https://github.com/BerriAI/litellm/pull/44183)
- feat(lens): add preset watch-for checks to investigation setup by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44313](https://github.com/BerriAI/litellm/pull/44313)
- fix(proxy): use OpenAI workload identity federation tokens on /openai_passthrough by [@&#8203;6matt](https://github.com/6matt) in [#&#8203;44140](https://github.com/BerriAI/litellm/pull/44140)
- feat(interactions): durable cross-pod settlement for background interaction billing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41955](https://github.com/BerriAI/litellm/pull/41955)
- fix(streaming): keep the finish_reason of the provider's last content chunk in the logged response by [@&#8203;joeym82956](https://github.com/joeym82956) in [#&#8203;44318](https://github.com/BerriAI/litellm/pull/44318)
- fix(bedrock): send the anthropic-workspace-id header to Bedrock Mantle by [@&#8203;kohjunhao](https://github.com/kohjunhao) in [#&#8203;44173](https://github.com/BerriAI/litellm/pull/44173)
- fix(guardrails): run unified guardrails on /v1/images/edits by [@&#8203;michelligabriele](https://github.com/michelligabriele) in [#&#8203;44195](https://github.com/BerriAI/litellm/pull/44195)
- feat(scaleway): add rerank support by [@&#8203;ankit373](https://github.com/ankit373) in [#&#8203;44160](https://github.com/BerriAI/litellm/pull/44160)
- fix(vector_stores): return managed file ids from vector store file list by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43800](https://github.com/BerriAI/litellm/pull/43800)
- fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43787](https://github.com/BerriAI/litellm/pull/43787)
- fix(guardrails): encrypt guardrail litellm_params secrets at rest by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;43627](https://github.com/BerriAI/litellm/pull/43627)
- fix(search_tools): encrypt search tool litellm_params at rest by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;43631](https://github.com/BerriAI/litellm/pull/43631)
- feat(roi): add GitLab sources and branch cost attribution by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44324](https://github.com/BerriAI/litellm/pull/44324)
- fix(model-prices): mark azure us/eu responses-only models as mode responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44323](https://github.com/BerriAI/litellm/pull/44323)
- revert(cost): revert "fix(cost): price rule-only model names at the deployment's rate" ([#&#8203;44144](https://github.com/BerriAI/litellm/issues/44144)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44335](https://github.com/BerriAI/litellm/pull/44335)
- fix(proxy): stamp the client alias on a copy of each streamed chunk so pricing sees the deployment model by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44341](https://github.com/BerriAI/litellm/pull/44341)
- revert(responses): revert "fix(responses): keep gpt-5.4/5.5 tool calls on chat and merge bridged tool calls into one choice" ([#&#8203;44295](https://github.com/BerriAI/litellm/issues/44295)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44344](https://github.com/BerriAI/litellm/pull/44344)
- refactor(dashboard): migrate to zod 4 and openai 6 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44345](https://github.com/BerriAI/litellm/pull/44345)
- feat(ui): move LiteAdmin into the header with a docked side panel by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44293](https://github.com/BerriAI/litellm/pull/44293)
- fix(responses): merge bridged tool calls into the same choice as the text by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44346](https://github.com/BerriAI/litellm/pull/44346)
- feat(ui): improve trace inspection and ROI estimation by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44351](https://github.com/BerriAI/litellm/pull/44351)
- refactor(ui): reorganize Lens dashboard components by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44354](https://github.com/BerriAI/litellm/pull/44354)
- refactor(ui): inject Lens backends as services instead of a fake HTTP client by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44369](https://github.com/BerriAI/litellm/pull/44369)
- refactor: clean up fresh tech debt from 2026-10-02 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44362](https://github.com/BerriAI/litellm/pull/44362)
- feat(traces): tracing development seed by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44363](https://github.com/BerriAI/litellm/pull/44363)
- refactor(types): replace Any with proven types in 4 files by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44370](https://github.com/BerriAI/litellm/pull/44370)
- build(deps): suppress unfixed braces GHSA-vfj7-8cjw-p6xm to clear osv-scan by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44347](https://github.com/BerriAI/litellm/pull/44347)
- fix(azure): add MAI-Image max_input_tokens from models sold directly page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44375](https://github.com/BerriAI/litellm/pull/44375)
- fix(proxy): emit postgres service spans only on real DB reads in auth cache helpers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44148](https://github.com/BerriAI/litellm/pull/44148)
- fix(otel): nest cache spans under their operation and name service spans by purpose by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44150](https://github.com/BerriAI/litellm/pull/44150)
- fix(otel): name postgres service spans by operation and table by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44240](https://github.com/BerriAI/litellm/pull/44240)
- perf(proxy): stop prompt-cache eligibility from tokenizing the whole conversation by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44221](https://github.com/BerriAI/litellm/pull/44221)
- fix(proxy): keep the database error when the log_db_metrics failure hook raises by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44383](https://github.com/BerriAI/litellm/pull/44383)
- feat(azure): add azure_ai/kimi-k2-thinking from Azure Kimi pricing page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44382](https://github.com/BerriAI/litellm/pull/44382)
- feat(harness): add Harness.TOOL_LOOP, a minimal in-process tool-calling loop by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44391](https://github.com/BerriAI/litellm/pull/44391)
- feat(decisions): add unified /v1/decisions endpoint for Jev-compatible providers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44236](https://github.com/BerriAI/litellm/pull/44236)
- fix(lens): paginate trace reads within ClickHouse limits by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44384](https://github.com/BerriAI/litellm/pull/44384)
- feat(lens): live dot field timeline and full-screen traces view by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44390](https://github.com/BerriAI/litellm/pull/44390)
- feat(ui): make LiteAdmin enterprise-only by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44399](https://github.com/BerriAI/litellm/pull/44399)
- fix(bedrock): stop emitting Converse cachePoint blocks for Kimi K3 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44292](https://github.com/BerriAI/litellm/pull/44292)
- test(cost): pin OpenAI reported web search count with mixed actions by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44414](https://github.com/BerriAI/litellm/pull/44414)
- fix(ci): give the pass-through auth regression test a real FastAPI app by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44403](https://github.com/BerriAI/litellm/pull/44403)
- fix(azure): add azure_ai/flux.2-pro input token limit from the models sold directly page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44405](https://github.com/BerriAI/litellm/pull/44405)
- fix(lens): batch run reads and reset trace pagination by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44398](https://github.com/BerriAI/litellm/pull/44398)
- fix(lens): preserve full trace access and expose investigation failures by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44406](https://github.com/BerriAI/litellm/pull/44406)
- feat: add make lens-dev for one-command lens local dev by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44413](https://github.com/BerriAI/litellm/pull/44413)
- fix(bedrock): honor the per-request timeout on Converse and Invoke streaming (internal copy of [#&#8203;38210](https://github.com/BerriAI/litellm/issues/38210)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44134](https://github.com/BerriAI/litellm/pull/44134)
- feat(traces): render curated SQL examples from shared files by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44388](https://github.com/BerriAI/litellm/pull/44388)
- fix(model_prices): registry audit 2026-10-03, add cohere embed v5, grok-imagine-video-1.5-lite and openrouter gpt-image rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44376](https://github.com/BerriAI/litellm/pull/44376)
- refactor(traces): extract snapshot cache by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44424](https://github.com/BerriAI/litellm/pull/44424)
- feat(lens): always-on investigations with findings and investigations tables by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44418](https://github.com/BerriAI/litellm/pull/44418)
- feat(docker): add a Windows quickstart in PowerShell, and a styled terminal for both quickstarts by [@&#8203;misbahsy](https://github.com/misbahsy) in [#&#8203;44310](https://github.com/BerriAI/litellm/pull/44310)
- feat(proxy): serve a Codex-native model catalog with per-model service_tiers from /v1/models by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44136](https://github.com/BerriAI/litellm/pull/44136)
- refactor(types): replace Any with proven types in 9 files by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44389](https://github.com/BerriAI/litellm/pull/44389)
- fix(proxy): treat Postgres connection exhaustion as DB unavailable, not poison spend-log rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44270](https://github.com/BerriAI/litellm/pull/44270)
- fix(proxy): treat Postgres connection exhaustion as backpressure, not poison rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44266](https://github.com/BerriAI/litellm/pull/44266)
- fix(lens): release budget reservations when the analysis model call fails by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44431](https://github.com/BerriAI/litellm/pull/44431)
- fix(mcp): preserve upstream tool schemas and parameter headers by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;44425](https://github.com/BerriAI/litellm/pull/44425)
- fix(bedrock_mantle): route Claude chat completions to the native Messages endpoint by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43646](https://github.com/BerriAI/litellm/pull/43646)
- fix(tracing): preserve spend identity and gateway correlation by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;44421](https://github.com/BerriAI/litellm/pull/44421)
- feat(roi): measure shipping velocity, quality, and recorded spend by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44426](https://github.com/BerriAI/litellm/pull/44426)
- fix(azure): set text-embedding max input to 8192 from the models sold directly page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44449](https://github.com/BerriAI/litellm/pull/44449)
- feat(ui): show invitation and reset password links in a copyable field by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44454](https://github.com/BerriAI/litellm/pull/44454)
- feat(lens): coordinate worker releases and bundled installs by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44428](https://github.com/BerriAI/litellm/pull/44428)
- fix(auth): resolve hidden model_group_alias entries in the zero-cost budget check by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43741](https://github.com/BerriAI/litellm/pull/43741)
- fix(vertex_ai): forward system and tools to partner model count_tokens by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43900](https://github.com/BerriAI/litellm/pull/43900)
- fix(traces): reject conflicting spend aliases and unrelated HTTP siblings by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44456](https://github.com/BerriAI/litellm/pull/44456)
- chore(cost-map): add azure_ai/kimi-k2-thinking retirement date from the Azure retired models page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44455](https://github.com/BerriAI/litellm/pull/44455)
- fix(health): probe Bedrock Mantle Claude deployments over the Anthropic Messages API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44419](https://github.com/BerriAI/litellm/pull/44419)
- fix(tests): match the OS bind error in the owned-proxy port-race retry by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44462](https://github.com/BerriAI/litellm/pull/44462)
- feat(anthropic): workload identity federation and pluggable identity sources by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44448](https://github.com/BerriAI/litellm/pull/44448)
- test(integration): exact four-part translation cases on a shared fake provider and shared YAML deployment by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44451](https://github.com/BerriAI/litellm/pull/44451)
- feat(roi): default people and branch lists to matched accounts by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44465](https://github.com/BerriAI/litellm/pull/44465)
- feat(enterprise): bundle LiteAdmin Slack with native gateway login by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44444](https://github.com/BerriAI/litellm/pull/44444)
- fix(caching): count tool_call cache_control marks in the injection census by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43556](https://github.com/BerriAI/litellm/pull/43556)
- chore(cost-map): sync openrouter prices from the models API by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44466](https://github.com/BerriAI/litellm/pull/44466)
- fix(lens): preserve approved worker digests and harden its image by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44467](https://github.com/BerriAI/litellm/pull/44467)
- feat: improve Lens dev seeding and live UI by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44468](https://github.com/BerriAI/litellm/pull/44468)
- test(ui): wait for step search value to settle in TraceDrawer test by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44470](https://github.com/BerriAI/litellm/pull/44470)
- feat(ui): share trace drawer as a closable SidePanel and polish Lens by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44473](https://github.com/BerriAI/litellm/pull/44473)
- fix(lens): align source setup with available worker images by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44476](https://github.com/BerriAI/litellm/pull/44476)
- feat(sdk): add run_tool_loop and arun_tool_loop helpers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44381](https://github.com/BerriAI/litellm/pull/44381)
- feat(lens): guide setup through the first investigation by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44475](https://github.com/BerriAI/litellm/pull/44475)
- test(ci): fix six CircleCI test regressions on main by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44429](https://github.com/BerriAI/litellm/pull/44429)
- fix(proxy-extras): log v1 migration failures at ERROR so LITELLM_LOG=ERROR shows them by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44202](https://github.com/BerriAI/litellm/pull/44202)
- feat(ui): inline Lens settings tab and investigation editor by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44479](https://github.com/BerriAI/litellm/pull/44479)
- feat(mcp): hand listed-tool description and input schema to pre-call hooks per caller by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41162](https://github.com/BerriAI/litellm/pull/41162)
- refactor: clean up fresh tech debt from 2026-10-03 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44484](https://github.com/BerriAI/litellm/pull/44484)
- fix(otel): read the registered v2 logger without importing the proxy by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44485](https://github.com/BerriAI/litellm/pull/44485)
- test(mcp): keep the SSO assertion round trip from matching its refresh token inside random ciphertext by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44494](https://github.com/BerriAI/litellm/pull/44494)
- test(ci): pin the ROI estimator flag and the prompt-cache counter in two drifted tests by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44499](https://github.com/BerriAI/litellm/pull/44499)
- refactor(ui): move TraceView into components/lens/traces by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44501](https://github.com/BerriAI/litellm/pull/44501)
- refactor(ui): rename view_logs to logs and split request, audit and detail by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44505](https://github.com/BerriAI/litellm/pull/44505)
- refactor(ui): share CopyButton between Lens traces and logs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44513](https://github.com/BerriAI/litellm/pull/44513)
- refactor(lens): storage-independent trace reads, shared keyset pager, typed read failures by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44422](https://github.com/BerriAI/litellm/pull/44422)
- fix(ci): send the Lens preview body as selection in the tracing endpoint tests by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44525](https://github.com/BerriAI/litellm/pull/44525)
- fix(azure): set gpt-realtime-2.1 retirement dates from the retirement schedule by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44526](https://github.com/BerriAI/litellm/pull/44526)
- fix(ci): repair the security sweep and Lens billing integration tests for ROI, JWKS, and release identity changes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44529](https://github.com/BerriAI/litellm/pull/44529)
- fix(dashboard): route dev API calls on Accept and fail fast on non-JSON 2xx by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44528](https://github.com/BerriAI/litellm/pull/44528)
- chore(cost-map): sync openrouter prices from the models API by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44533](https://github.com/BerriAI/litellm/pull/44533)
- refactor(ui): route dashboard URL state through nuqs parsers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44537](https://github.com/BerriAI/litellm/pull/44537)
- fix(logging): deduplicate streaming failure callbacks by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44442](https://github.com/BerriAI/litellm/pull/44442)
- feat(proxy): add LITELLM_FIPS_MODE startup gate with provider assertion and loud password migration failure by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;42700](https://github.com/BerriAI/litellm/pull/42700)
- fix(guardrails): run the end-of-stream post_call scan when the client disconnects mid-stream by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43839](https://github.com/BerriAI/litellm/pull/43839)
- refactor(mcp): fix Sequence/list return mismatch and collapse record_listed_tools wrapper by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44556](https://github.com/BerriAI/litellm/pull/44556)
- chore(cost-map): add azure retirement dates for gpt-4o-realtime-preview-2024-10-01 and jamba-instruct by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44567](https://github.com/BerriAI/litellm/pull/44567)
- feat(ui): add persistent columns and loading skeletons to Lens runs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44579](https://github.com/BerriAI/litellm/pull/44579)
- fix(ui): remove Top models by task card from Model Leaderboard by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44502](https://github.com/BerriAI/litellm/pull/44502)
- refactor(rust): track ClickHouse migrations in a checksummed ledger by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44580](https://github.com/BerriAI/litellm/pull/44580)
- refactor(ui): extract shared timeline and time-range controls by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44584](https://github.com/BerriAI/litellm/pull/44584)
- fix(azure): set gpt-4o-transcribe retirement date from the retirement schedule by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44585](https://github.com/BerriAI/litellm/pull/44585)
- ci: move Postgres, MCP and Redis suites to CircleCI integration by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44453](https://github.com/BerriAI/litellm/pull/44453)
- chore!: retire the integrated ROI calculator by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44477](https://github.com/BerriAI/litellm/pull/44477)
- fix(caching): key response cache by router model group in litellm_metadata by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44542](https://github.com/BerriAI/litellm/pull/44542)
- fix(auto-router): align preview and serving default resolution by [@&#8203;moyai-berriai](https://github.com/moyai-berriai)\[bot] in [#&#8203;44436](https://github.com/BerriAI/litellm/pull/44436)
- fix(mcp): bind OAuth clients to their upstream issuer by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;37777](https://github.com/BerriAI/litellm/pull/37777)
- feat(guardrails): add llm shield pii redaction and rehydration guardrail by [@&#8203;ninadphalak](https://github.com/ninadphalak) in [#&#8203;42645](https://github.com/BerriAI/litellm/pull/42645)
- refactor(tracing): generate existing HTTP request models from Rust schemas by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44591](https://github.com/BerriAI/litellm/pull/44591)
- ci: run unit selections from GHA test-path and drop the CircleCI unit jobs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44461](https://github.com/BerriAI/litellm/pull/44461)
- fix(ui): make mobile sidebar and top bar responsive by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44603](https://github.com/BerriAI/litellm/pull/44603)
- refactor(types): replace Any with proven types in 137 files by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;44478](https://github.com/BerriAI/litellm/pull/44478)
- fix(ui): restore inline Lens onboarding and responsive layout by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44604](https://github.com/BerriAI/litellm/pull/44604)
- test(integration): anthropic-route basic translation cases for six Claude models on messages, chat completions and responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44607](https://github.com/BerriAI/litellm/pull/44607)
- fix(responses): report truncated bridged output as incomplete and echo request params by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44460](https://github.com/BerriAI/litellm/pull/44460)
- fix(proxy): enforce internal-user model creation prohibition by [@&#8203;moyai-berriai](https://github.com/moyai-berriai)\[bot] in [#&#8203;44438](https://github.com/BerriAI/litellm/pull/44438)
- chore(harness): drop the unused Any import left in harness options by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44625](https://github.com/BerriAI/litellm/pull/44625)
- fix(harness): drop the unused Any import that fails ruff on main by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44627](https://github.com/BerriAI/litellm/pull/44627)
- refactor(proxy): rename management/teams/access.py to authz.py by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;44624](https://github.com/BerriAI/litellm/pull/44624)
- feat(tracing)!: return only data from SQL queries by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44609](https://github.com/BerriAI/litellm/pull/44609)
- fix(openai/realtime): drop model from upstream URL for intent=transcription by [@&#8203;michelligabriele](https://github.com/michelligabriele) in [#&#8203;43854](https://github.com/BerriAI/litellm/pull/43854)
- fix(gemini): add priority tier audio input price to three Gemini rows by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44632](https://github.com/BerriAI/litellm/pull/44632)
- fix(cost): bill per-second transcription models outside chat modes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44458](https://github.com/BerriAI/litellm/pull/44458)
- fix(ui): explain why team member reset spend is unavailable instead of hiding it by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44629](https://github.com/BerriAI/litellm/pull/44629)
- test(integration): bedrock_converse-route basic translation cases for six Claude models on messages, chat completions and responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44646](https://github.com/BerriAI/litellm/pull/44646)
- test(integration): run the anthropic /v1/responses basic translation cases now that the bridge echoes request params by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44615](https://github.com/BerriAI/litellm/pull/44615)
- feat(lens): restore compact navigation with live investigation review by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44472](https://github.com/BerriAI/litellm/pull/44472)
- feat(proxy): limit which models an end user can call by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43904](https://github.com/BerriAI/litellm/pull/43904)
- fix(sso): let CLI and Claude Code gateway sign-in through on DISABLE_ADMIN_UI nodes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44620](https://github.com/BerriAI/litellm/pull/44620)
- feat(ui): declare shared search operators and flush queries on blur by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44665](https://github.com/BerriAI/litellm/pull/44665)
- fix(lens): make tool steps and conversations readable by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44645](https://github.com/BerriAI/litellm/pull/44645)
- fix(ui): send null instead of $0 when a team's member default budget is cleared by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;44644](https://github.com/BerriAI/litellm/pull/44644)
- test(integration): azure_ai-route basic translation cases for six Claude models on messages, chat completions and responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44658](https://github.com/BerriAI/litellm/pull/44658)
- test(integration): basic translation cases for the openai_responses route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44663](https://github.com/BerriAI/litellm/pull/44663)
- feat(lens): analyze trace workspaces with confined Python and compaction by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44640](https://github.com/BerriAI/litellm/pull/44640)
- fix(vertex-ai): add deprecation_date to gemini-3.1-flash-lite-image by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44639](https://github.com/BerriAI/litellm/pull/44639)
- fix(bedrock): add priority and flex prices for Grok 4.3, 4.6, 4.7 and Kimi K3 by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44670](https://github.com/BerriAI/litellm/pull/44670)
- test(integration): pin the Claude-tokenizer recount for streamed claude-sonnet-5 no-usage cases by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44643](https://github.com/BerriAI/litellm/pull/44643)
- feat(proxy): embed enterprise LiteAdmin MCP in LiteLLM images by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44610](https://github.com/BerriAI/litellm/pull/44610)
- test(integration): basic translation cases for the azure route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44672](https://github.com/BerriAI/litellm/pull/44672)
- test(integration): assert the Messages API health probe on Mantle Claude by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44612](https://github.com/BerriAI/litellm/pull/44612)
- refactor(rust): rename litellm-framing crate to litellm-framer by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44683](https://github.com/BerriAI/litellm/pull/44683)
- test(integration): basic translation cases for the gemini route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44662](https://github.com/BerriAI/litellm/pull/44662)
- test(integration): basic translation cases for the openai route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44667](https://github.com/BerriAI/litellm/pull/44667)
- refactor(rust): derive string enum serde through strum and serde_with by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44675](https://github.com/BerriAI/litellm/pull/44675)
- fix(spend-tracking): stop caching failed spend-log metadata lookups as confirmed misses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43560](https://github.com/BerriAI/litellm/pull/43560)
- fix(proxy): let a listed team alias win over a same-named key alias in the customer model check by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44677](https://github.com/BerriAI/litellm/pull/44677)
- chore: move PR template to PULL_REQUEST_TEMPLATE/general.md, add rust.md by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44693](https://github.com/BerriAI/litellm/pull/44693)
- fix(router): retry a /v1/messages stream the provider drops before the first content chunk by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44276](https://github.com/BerriAI/litellm/pull/44276)
- fix(lens): persist final coverage with source diagnostics by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44682](https://github.com/BerriAI/litellm/pull/44682)
- test(integration): point the scratch upgraded proxy's read replica at the scratch database by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44613](https://github.com/BerriAI/litellm/pull/44613)
- fix(lens): show investigation findings for agent traces by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44696](https://github.com/BerriAI/litellm/pull/44696)
- fix(build): rebuild the Rust bridge when uv sync sees Rust sources change by [@&#8203;nate-berri](https://github.com/nate-berri) in [#&#8203;44708](https://github.com/BerriAI/litellm/pull/44708)
- fix(lens): preserve span timestamps in investigation evidence by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44702](https://github.com/BerriAI/litellm/pull/44702)
- ci: split slow unit shards and build the Rust bridge once per run by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44622](https://github.com/BerriAI/litellm/pull/44622)
- test(rust_bridge): expect PartRow start_time and end_time as required LENS_CONTENT fields by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44719](https://github.com/BerriAI/litellm/pull/44719)
- chore(deps): bump langgraph-sdk from 0.4.2 to 0.4.4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;44713](https://github.com/BerriAI/litellm/pull/44713)
- feat: add Reka as an OpenAI-compatible provider by [@&#8203;anniejeng](https://github.com/anniejeng) in [#&#8203;44278](https://github.com/BerriAI/litellm/pull/44278)
- feat(ui): support native decisions endpoint in decision playground by [@&#8203;moyai-berriai](https://github.com/moyai-berriai)\[bot] in [#&#8203;44664](https://github.com/BerriAI/litellm/pull/44664)
- fix(lens): reconstruct native coding agent conversations by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44711](https://github.com/BerriAI/litellm/pull/44711)
- fix(responses): honor request cache controls on chat completions bridged to the Responses API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44676](https://github.com/BerriAI/litellm/pull/44676)
- fix(deps): bump source-map-js, smol-toml, mako, multidict and werkzeug for OSV advisories by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44728](https://github.com/BerriAI/litellm/pull/44728)
- test(integration): rename translation runner run to assert_translation by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44741](https://github.com/BerriAI/litellm/pull/44741)
- feat(lens): show investigation names in findings table by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44753](https://github.com/BerriAI/litellm/pull/44753)
- feat(ui): configure cache-aware auto routing by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;43396](https://github.com/BerriAI/litellm/pull/43396)
- fix(lens): bound result recovery and preserve partial results by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44692](https://github.com/BerriAI/litellm/pull/44692)
- feat(prometheus): cap series per metric for every labeled metric by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44420](https://github.com/BerriAI/litellm/pull/44420)
- feat(lens): type to filter the traces agent dropdown by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44745](https://github.com/BerriAI/litellm/pull/44745)
- test(lens): use current worker protocol in billing integration by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44760](https://github.com/BerriAI/litellm/pull/44760)
- feat(model_prices): add chatgpt subscription rows for the gpt-6 family by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44758](https://github.com/BerriAI/litellm/pull/44758)
- test(e2e): assert the sibling-replica cooldown through the router by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44706](https://github.com/BerriAI/litellm/pull/44706)
- test(integration): basic translation cases for the bedrock_invoke route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44752](https://github.com/BerriAI/litellm/pull/44752)
- fix(gemini): stop replaying thinking block signatures to Gemini by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44661](https://github.com/BerriAI/litellm/pull/44661)
- fix(ci): namespace claude session ids in tracing seeds and allowlist /v1/logs on backend by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44761](https://github.com/BerriAI/litellm/pull/44761)
- fix(proxy): judge the free-model budget waiver by the group an alias routes to by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44638](https://github.com/BerriAI/litellm/pull/44638)
- test(integration): basic translation cases for the vertex_ai route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44751](https://github.com/BerriAI/litellm/pull/44751)
- fix(vertex_ai): apply regional endpoint uplift on image generation cost path by [@&#8203;nate-berri](https://github.com/nate-berri) in [#&#8203;44679](https://github.com/BerriAI/litellm/pull/44679)
- refactor(tests): extract Rust cache test split from [#&#8203;44714](https://github.com/BerriAI/litellm/issues/44714) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44780](https://github.com/BerriAI/litellm/pull/44780)
- feat(proxy): cap batch file records, daily batch uploads, and per-file downloads by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43632](https://github.com/BerriAI/litellm/pull/43632)
- feat(lens): add copy link button to trace header by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44749](https://github.com/BerriAI/litellm/pull/44749)
- test(integration): keep scripted upstream connections open past the proxy's keepalive by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44695](https://github.com/BerriAI/litellm/pull/44695)
- test(integration): basic translation cases for the bedrock_mantle route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44750](https://github.com/BerriAI/litellm/pull/44750)
- fix(chatgpt,github_copilot): refuse device-code login inside an event loop or worker thread by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;39585](https://github.com/BerriAI/litellm/pull/39585)
- feat(bedrock): add glm 5.3 cross-region rows and nova 2.5 sonic by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44710](https://github.com/BerriAI/litellm/pull/44710)
- fix(responses): honor caller stream flag when provider forces SSE (internal copy of [#&#8203;34095](https://github.com/BerriAI/litellm/issues/34095)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41235](https://github.com/BerriAI/litellm/pull/41235)
- refactor(cache): remove dead Cache.\_native_cache run…
Cartofante pushed a commit to CartoDB/litellm that referenced this pull request Oct 26, 2026
… retrieve/cancel (BerriAI#47067)

* fix(proxy): authorize the public name of a team-scoped model on batch retrieve/cancel

A unified batch id resolves to the deployment's internal model_name
(model_name_{team_id}_{uuid}), which is in no key or team allowlist, so
authorize_model_for_key always denied and team keys got 403 retrieving or
cancelling their own batches. Authorize against model_info
team_public_model_name when the resolved deployment is team-scoped, falling
back to the resolved name otherwise.

Fixes BerriAI#46958

* fix(proxy): authorize team-scoped batch models by their public name on both auth paths

* fix(proxy): accept the owning team's public name for its own team deployment on every auth path

Managed batch, file, fine-tuning, vector store, character and video ids resolve to the
team deployment's internal name again, so teams that granted the internal name keep access.
The model access check now also accepts the owning team's public name and its legacy team
aliases for that internal name, and only when the caller's team owns the deployment.

* fix(proxy): match a team deployment's public and alias names against the caller's own grants

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
(cherry picked from commit e979bd0)
yuneng-berri pushed a commit that referenced this pull request Oct 28, 2026
… retrieve/cancel (#47067)

* fix(proxy): authorize the public name of a team-scoped model on batch retrieve/cancel

A unified batch id resolves to the deployment's internal model_name
(model_name_{team_id}_{uuid}), which is in no key or team allowlist, so
authorize_model_for_key always denied and team keys got 403 retrieving or
cancelling their own batches. Authorize against model_info
team_public_model_name when the resolved deployment is team-scoped, falling
back to the resolved name otherwise.

Fixes #46958

* fix(proxy): authorize team-scoped batch models by their public name on both auth paths

* fix(proxy): accept the owning team's public name for its own team deployment on every auth path

Managed batch, file, fine-tuning, vector store, character and video ids resolve to the
team deployment's internal name again, so teams that granted the internal name keep access.
The model access check now also accepts the owning team's public name and its legacy team
aliases for that internal name, and only when the caller's team owns the deployment.

* fix(proxy): match a team deployment's public and alias names against the caller's own grants

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
(cherry picked from commit e979bd0)
haowang1013 pushed a commit to directivegames/litellm that referenced this pull request Nov 3, 2026
… retrieve/cancel (BerriAI#47067)

* fix(proxy): authorize the public name of a team-scoped model on batch retrieve/cancel

A unified batch id resolves to the deployment's internal model_name
(model_name_{team_id}_{uuid}), which is in no key or team allowlist, so
authorize_model_for_key always denied and team keys got 403 retrieving or
cancelling their own batches. Authorize against model_info
team_public_model_name when the resolved deployment is team-scoped, falling
back to the resolved name otherwise.

Fixes BerriAI#46958

* fix(proxy): authorize team-scoped batch models by their public name on both auth paths

* fix(proxy): accept the owning team's public name for its own team deployment on every auth path

Managed batch, file, fine-tuning, vector store, character and video ids resolve to the
team deployment's internal name again, so teams that granted the internal name keep access.
The model access check now also accepts the owning team's public name and its legacy team
aliases for that internal name, and only when the caller's team owns the deployment.

* fix(proxy): match a team deployment's public and alias names against the caller's own grants

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
(cherry picked from commit e979bd0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants