mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Litellm dev 01 01 2025 p2 (#7615)
* fix(utils.py): prevent double logging when passing 'fallbacks=' to .completion() Fixes https://github.com/BerriAI/litellm/issues/7477 * fix(utils.py): fix vertex anthropic check * fix(utils.py): ensure supported params is always set Fixes https://github.com/BerriAI/litellm/issues/7470 * test(test_optional_params.py): add unit testing to prevent mistranslation Fixes https://github.com/BerriAI/litellm/issues/7470 * fix: fix linting error * test: cleanup
This commit is contained in:
parent
081826a5d6
commit
e8ed40a27b
5 changed files with 115 additions and 206 deletions
|
@ -34,3 +34,27 @@ def test_acompletion_params():
|
|||
|
||||
|
||||
# test_acompletion_params()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_langfuse_double_logging():
|
||||
import litellm
|
||||
|
||||
litellm.set_verbose = True
|
||||
litellm.success_callback = ["langfuse"]
|
||||
litellm.failure_callback = ["langfuse"] # logs errors to langfuse
|
||||
|
||||
models = ["gpt-4o-mini", "claude-3-5-haiku-20241022"]
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Hello, how are you?"},
|
||||
]
|
||||
|
||||
resp = await litellm.acompletion(
|
||||
model=models[0],
|
||||
messages=messages,
|
||||
temperature=0.0,
|
||||
fallbacks=models[1:],
|
||||
# metadata={"generation_name": "test-gen", "project": "litellm-test"},
|
||||
)
|
||||
return resp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue