mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
feat(tests): enable MCP tests in server mode
We would like to run all OpenAI compatibility tests using only the openai-client library. This is most friendly for contributors since they can run tests without needing to update the client-sdks (which is getting easier but still a long pole.) This is the first step in enabling that -- no using "library client" for any of the Responses tests. This seems like a reasonable trade-off since the usage of an embeddeble library client for Responses (or any OpenAI-compatible) behavior seems to be not very common. To do this, we needed to enable MCP tests (which only worked in library client mode) for server mode.
This commit is contained in:
parent
fcf649b97a
commit
a7df687167
16 changed files with 5556 additions and 121 deletions
|
|
@ -131,18 +131,18 @@ class TestConversationResponses:
|
|||
assert len(response.output_text.strip()) > 0
|
||||
|
||||
# this is not ready yet
|
||||
# def test_conversation_compat_client(self, compat_client, text_model_id):
|
||||
# def test_conversation_compat_client(self, responses_client, text_model_id):
|
||||
# """Test conversation parameter works with compatibility client."""
|
||||
# if not hasattr(compat_client, "conversations"):
|
||||
# pytest.skip("compat_client does not support conversations API")
|
||||
# if not hasattr(responses_client, "conversations"):
|
||||
# pytest.skip("responses_client does not support conversations API")
|
||||
#
|
||||
# conversation = compat_client.conversations.create()
|
||||
# response = compat_client.responses.create(
|
||||
# conversation = responses_client.conversations.create()
|
||||
# response = responses_client.responses.create(
|
||||
# model=text_model_id, input="Tell me a joke", conversation=conversation.id
|
||||
# )
|
||||
#
|
||||
# assert response is not None
|
||||
# assert len(response.output_text.strip()) > 0
|
||||
#
|
||||
# conversation_items = compat_client.conversations.items.list(conversation.id)
|
||||
# conversation_items = responses_client.conversations.items.list(conversation.id)
|
||||
# assert len(conversation_items.data) >= 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue