mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-11 17:05:43 +00:00
0f63cbea59
* add BaseInteractionsTest * add interactions_api_handler * init bridge * init LiteLLMResponsesInteractionsConfig * LiteLLMResponsesInteractionsHandler * mv test * fixes api spec * docs * fix transform+iterators * docs fix * fix iterator
30 lines
875 B
Python
30 lines
875 B
Python
"""
|
|
Tests for LiteLLM Responses bridge provider.
|
|
|
|
Inherits from BaseInteractionsTest to run the same test suite against
|
|
the litellm_responses bridge provider, which calls litellm.responses() internally.
|
|
"""
|
|
|
|
import os
|
|
|
|
from tests.test_litellm.interactions.base_interactions_test import (
|
|
BaseInteractionsTest,
|
|
)
|
|
|
|
|
|
class TestLiteLLMResponsesBridge(BaseInteractionsTest):
|
|
"""Test LiteLLM Responses bridge using the base test suite."""
|
|
|
|
def get_model(self) -> str:
|
|
"""Return the model string for the bridge provider.
|
|
|
|
The bridge provider uses litellm.responses() internally, so we can
|
|
use any model that litellm.responses() supports (e.g., gpt-4o).
|
|
"""
|
|
return "gpt-4o"
|
|
|
|
def get_api_key(self) -> str:
|
|
"""Return the OpenAI API key from environment."""
|
|
return os.getenv("OPENAI_API_KEY", "")
|
|
|