mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(openai/): allows 'reasoning_effort' param to be passed correctly (#8227)
* fix(openai/): allows 'reasoning_effort' param to be passed correctly Fixes https://github.com/BerriAI/litellm/issues/8217 * test: update test to handle gemini token counter change * fix(factory.py): fix bedrock http:// handling * test: fix test * test: update testing for new openai sdk
This commit is contained in:
parent
302cc4f583
commit
c17342ac5b
6 changed files with 216 additions and 194 deletions
|
@ -71,11 +71,11 @@ def test_init_clients():
|
|||
print(async_client._base_url)
|
||||
assert (
|
||||
async_client._base_url
|
||||
== "https://openai-gpt-4-test-v-1.openai.azure.com//openai/"
|
||||
) # openai python adds the extra /
|
||||
== "https://openai-gpt-4-test-v-1.openai.azure.com/openai/"
|
||||
)
|
||||
assert (
|
||||
stream_async_client._base_url
|
||||
== "https://openai-gpt-4-test-v-1.openai.azure.com//openai/"
|
||||
== "https://openai-gpt-4-test-v-1.openai.azure.com/openai/"
|
||||
)
|
||||
|
||||
print("PASSED !")
|
||||
|
@ -448,7 +448,9 @@ async def test_openai_with_organization(sync_mode):
|
|||
)
|
||||
except Exception as e:
|
||||
print("Got exception: " + str(e))
|
||||
assert "header should match organization for API key" in str(e)
|
||||
assert "header should match organization for API key" in str(
|
||||
e
|
||||
) or "No such organization" in str(e)
|
||||
|
||||
# good org works
|
||||
response = router.completion(
|
||||
|
@ -478,7 +480,9 @@ async def test_openai_with_organization(sync_mode):
|
|||
)
|
||||
except Exception as e:
|
||||
print("Got exception: " + str(e))
|
||||
assert "header should match organization for API key" in str(e)
|
||||
assert "header should match organization for API key" in str(
|
||||
e
|
||||
) or "No such organization" in str(e)
|
||||
|
||||
# good org works
|
||||
response = await router.acompletion(
|
||||
|
@ -581,7 +585,9 @@ async def test_aaaaatext_completion_with_organization():
|
|||
pytest.fail("Request should have failed - This organization does not exist")
|
||||
except Exception as e:
|
||||
print("Got exception: " + str(e))
|
||||
assert "header should match organization for API key" in str(e)
|
||||
assert "header should match organization for API key" in str(
|
||||
e
|
||||
) or "No such organization" in str(e)
|
||||
|
||||
# good org works
|
||||
response = await router.atext_completion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue