mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
fix(anthropic): keep prompt cache prediction supported for queue-bounded deployments
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
446fadc4c7
commit
fe0eee6451
2 changed files with 10 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ _DEPLOYMENT_OPTIONS: Final = frozenset(
|
|||
"max_retries",
|
||||
"num_retries",
|
||||
"max_parallel_requests",
|
||||
"max_parallel_requests_queue_size",
|
||||
"input_cost_per_token",
|
||||
"output_cost_per_token",
|
||||
"cache_read_input_token_cost",
|
||||
|
|
|
|||
|
|
@ -181,6 +181,15 @@ async def test_environment_credential_matches_native_count_and_observed_scope(
|
|||
assert observed.scope == cache_scope(_CALLER, _DEPLOYMENT, target.api_key, target.model)
|
||||
|
||||
|
||||
def test_deployment_concurrency_knobs_keep_native_prediction_supported() -> None:
|
||||
target: Final = resolve_prediction_target(LiteLLM_Params(
|
||||
model=f"anthropic/{_MODEL}", api_key=_KEY, api_base="https://api.anthropic.com",
|
||||
max_parallel_requests=1, max_parallel_requests_queue_size=0,
|
||||
))
|
||||
assert isinstance(target, NativePredictionTarget)
|
||||
assert (target.model, target.api_key) == (_MODEL, _KEY)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("inline_key", [None, _KEY])
|
||||
@pytest.mark.asyncio
|
||||
async def test_named_credential_is_explicitly_unsupported_before_count(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue