forked from phoenix/litellm-mirror
(fix) get_response_headers for Azure OpenAI (#6344)
* fix get_response_headers * unit testing for get headers * unit testing for anthropic / azure openai headers * increase test coverage for test_completion_response_ratelimit_headers * fix test rate limit headers
This commit is contained in:
parent
fb523b79e9
commit
274bf3e48d
6 changed files with 316 additions and 30 deletions
|
@ -4569,6 +4569,13 @@ def test_completion_response_ratelimit_headers(model, stream):
|
|||
assert "x-ratelimit-remaining-requests" in additional_headers
|
||||
assert "x-ratelimit-remaining-tokens" in additional_headers
|
||||
|
||||
if model == "azure/chatgpt-v-2":
|
||||
# Azure OpenAI header
|
||||
assert "llm_provider-azureml-model-session" in additional_headers
|
||||
if model == "claude-3-sonnet-20240229":
|
||||
# anthropic header
|
||||
assert "llm_provider-anthropic-ratelimit-requests-reset" in additional_headers
|
||||
|
||||
|
||||
def _openai_hallucinated_tool_call_mock_response(
|
||||
*args, **kwargs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue