llama-stack-mirror/tests/integration/inference/recordings/c9f153318fe61fb66b52b29c940a2decc5def5e2c19069e084ccfc0b0f5705b3.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

44 lines
1.6 KiB
JSON

{
"test_id": "tests/integration/inference/test_openai_completion.py::test_openai_completion_non_streaming[txt=ollama/llama3.2:3b-instruct-fp16-inference:completion:sanity]",
"request": {
"method": "POST",
"url": "http://0.0.0.0:11434/v1/v1/completions",
"headers": {},
"body": {
"model": "llama3.2:3b-instruct-fp16",
"prompt": "Respond to this question and explain your answer. Complete the sentence using one word: Roses are red, violets are ",
"stream": false,
"extra_body": {}
},
"endpoint": "/v1/completions",
"model": "llama3.2:3b-instruct-fp16"
},
"response": {
"body": {
"__type__": "openai.types.completion.Completion",
"__data__": {
"id": "rec-c9f153318fe6",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "purple.\n\nThis is a well-known rhyming phrase commonly used as a Valentine's Day greeting or a lighthearted way to express affection. The completed sentence is often written as: \"Roses are red, violets are purple.\" This rhyme scheme helps to create a memorable and catchy phrase that can be easily repeated and shared with others."
}
],
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "text_completion",
"system_fingerprint": "fp_ollama",
"usage": {
"completion_tokens": 73,
"prompt_tokens": 50,
"total_tokens": 123,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
},
"is_streaming": false
}
}