llama-stack-mirror/tests/integration/common/recordings/395c30078677826058a0cbe136dfd07c816854cfb7015ee4ece0e414d16e7e52.json
Ashwin Bharambe 79bed44b04
fix(tests): ensure test isolation in server mode (#3737)
Propagate test IDs from client to server via HTTP headers to maintain
proper test isolation when running with server-based stack configs.
Without
this, recorded/replayed inference requests in server mode would leak
across
tests.

Changes:
- Patch client _prepare_request to inject test ID into provider data
header
- Sync test context from provider data on server side before storage
operations
- Set LLAMA_STACK_TEST_STACK_CONFIG_TYPE env var based on stack config
- Configure console width for cleaner log output in CI
- Add SQLITE_STORE_DIR temp directory for test data isolation
2025-10-08 12:03:36 -07:00

57 lines
2.1 KiB
JSON

{
"test_id": null,
"request": {
"method": "POST",
"url": "http://0.0.0.0:11434/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "llama3.2:3b-instruct-fp16",
"messages": [
{
"role": "user",
"content": "Test trace openai 2"
}
],
"stream": false
},
"endpoint": "/v1/chat/completions",
"model": "llama3.2:3b-instruct-fp16"
},
"response": {
"body": {
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
"__data__": {
"id": "rec-395c30078677",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "I'd be happy to help you test the new text-based interface for the OpenAI chat model, known as \"ChatGPT\". Here's how we can do it:\n\n**What is the new interface?**\n\nThe new interface is a simple text-based interface that allows you to interact with an AI model using plain text commands. You can type in a question or prompt, and the AI will respond with a relevant answer.\n\n**How to test the interface:**\n\n1. Type your query in the chat window below.\n2. Press enter to submit your query.\n3. The AI will respond with an answer, which you can then examine and ask follow-up questions about.\n\nGo ahead and try something! What would you like to know or discuss?",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": "fp_ollama",
"usage": {
"completion_tokens": 151,
"prompt_tokens": 31,
"total_tokens": 182,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
},
"is_streaming": false
}
}