mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(cli): pin pi compat flags so lite pi stops sending store to Anthropic models (#40739)
* fix(cli): pin pi compat flags for gateway models Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(cli): annotate pi compatibility field Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(cli): clarify pi compatibility suppression Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(cli): drop the stale mutable-ok suppression on the pi compat block --------- Co-authored-by: jesus <jesus@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
This commit is contained in:
parent
591637d475
commit
c5c5154c4b
2 changed files with 7 additions and 0 deletions
|
|
@ -190,10 +190,16 @@ def provider_block(
|
|||
|
||||
Real contextWindow/maxTokens matter: pi otherwise assumes 128k/16384, which
|
||||
breaks compaction thresholds and over-asks models with smaller output caps.
|
||||
pi sniffs compat from the base URL, and one gateway URL fronts models with
|
||||
different capabilities, so both flags are pinned off.
|
||||
"""
|
||||
return {
|
||||
"baseUrl": base_url.rstrip("/") + "/v1",
|
||||
"api": "openai-completions",
|
||||
"compat": {
|
||||
"supportsStore": False,
|
||||
"supportsLongCacheRetention": False,
|
||||
},
|
||||
"apiKey": f"${LITELLM_PROXY_API_KEY_ENV}",
|
||||
"models": [_model_entry(model_id, limits) for model_id in model_ids],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ class TestProviderBlock:
|
|||
assert block == {
|
||||
"baseUrl": "http://localhost:4000/v1",
|
||||
"api": "openai-completions",
|
||||
"compat": {"supportsStore": False, "supportsLongCacheRetention": False},
|
||||
"apiKey": "$LITELLM_PROXY_API_KEY",
|
||||
"models": [{"id": "m-1"}, {"id": "m-2"}],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue