Avoid constructing a default Usage() object that gets immediately
overwritten by convert_to_model_response_object. Set usage=None
instead; the real Usage is assigned via setattr later.
Also fix Bedrock Qwen2/Qwen3 transform_response to assign a new
Usage object instead of mutating a potentially missing one.
The OpenAI `store` parameter (used for storing completions for
distillation/evals) was missing from `OPENAI_CHAT_COMPLETION_PARAMS`.
This caused it to be unrecognized by `get_standard_openai_params()` and
the `litellm_proxy` provider config. It also meant that code paths using
this list (rather than `DEFAULT_CHAT_COMPLETION_PARAM_VALUES`) would
treat `store` as a provider-specific parameter and forward it to
non-OpenAI providers like Anthropic, resulting in:
"store: Extra inputs are not permitted"
Fixes#19700
Replace per-call .model_fields.keys() allocations and linear-scan membership
checks with module-level frozenset constants and dict.keys() set difference.
Defer locals() from hot path to except block. 617µs → 524µs/call.
* fix:fix: prompt_cache_key OAI + Azure OpenAI
* test_prompt_cache_key_supported
* test_azure_openai_with_prompt_cache_key
* fix: remove unnecessary async from test_azure_openai_with_prompt_cache_key
Addresses Greptile feedback: litellm.completion() is synchronous, so
async def is unnecessary and would silently pass without running.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove unused filter_and_transform_beta_headers imports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test_azure_openai_with_prompt_cache_key
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* added support for nova grounding for amazon nova model
* added citations support
* added integration tests
* removing test file
* refactor: Use web_search_options for Nova grounding instead of system_tool
---------
Co-authored-by: Juhie <juhiechandra@gmail.com>
Co-authored-by: Juhie <75068056+juhiechandra@users.noreply.github.com>
* fix(agentcore): simplify agentcore streaming
* fix(agentcore): move CustomStreamWrapper import to module level
The deferred imports inside streaming methods caused initialization delays
during health check requests, leading to timeouts in ECS deployments.
- Move CustomStreamWrapper import to module-level (line 19)
- Remove deferred imports from get_sync_custom_stream_wrapper (line 588)
- Remove deferred import from get_async_custom_stream_wrapper (line 747)
- Remove from TYPE_CHECKING block to use actual import
This ensures the import happens at module load time rather than during
first request processing, preventing health check endpoint blocking.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test(agentcore): ensure sync response
* chore: upgrade boto3 to 1.40.76 in pyproject.toml
* chore: added taplo.toml
* fix(types): correct annotation type hint for MyPy compatibility
Update _convert_annotations_to_chat_format return type from
Dict[str, Any] to ChatCompletionAnnotation TypedDict to match
the Message class's expected type signature.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Benedikt Óskarsson <bensi94@hotmail.com>