mirror of
				https://github.com/meta-llama/llama-stack.git
				synced 2025-10-25 09:05:37 +00:00 
			
		
		
		
	IDs are now deterministic hashes based on request content, and timestamps are normalized to constants, eliminating spurious changes when re-recording tests. ## Changes - Updated `inference_recorder.py` to normalize IDs and timestamps during recording - Added `scripts/normalize_recordings.py` utility to re-normalize existing recordings - Created documentation in `tests/integration/recordings/README.md` - Normalized 350 existing recording files
		
			
				
	
	
		
			71 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
|   "request": {
 | |
|     "method": "POST",
 | |
|     "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions",
 | |
|     "headers": {},
 | |
|     "body": {
 | |
|       "model": "gpt-5-mini",
 | |
|       "messages": [
 | |
|         {
 | |
|           "role": "user",
 | |
|           "content": "Which planet has rings around it with a name starting with letter S?"
 | |
|         }
 | |
|       ],
 | |
|       "stream": false
 | |
|     },
 | |
|     "endpoint": "/v1/chat/completions",
 | |
|     "model": "gpt-5-mini"
 | |
|   },
 | |
|   "response": {
 | |
|     "body": {
 | |
|       "__type__": "openai.types.chat.chat_completion.ChatCompletion",
 | |
|       "__data__": {
 | |
|         "id": "rec-57b67d1b1a36",
 | |
|         "choices": [
 | |
|           {
 | |
|             "finish_reason": "stop",
 | |
|             "index": 0,
 | |
|             "logprobs": null,
 | |
|             "message": {
 | |
|               "content": "Saturn. It's the planet famous for its prominent ring system made of ice and rock.",
 | |
|               "refusal": null,
 | |
|               "role": "assistant",
 | |
|               "annotations": [],
 | |
|               "audio": null,
 | |
|               "function_call": null,
 | |
|               "tool_calls": null
 | |
|             },
 | |
|             "content_filter_results": {}
 | |
|           }
 | |
|         ],
 | |
|         "created": 0,
 | |
|         "model": "gpt-5-mini-2025-08-07",
 | |
|         "object": "chat.completion",
 | |
|         "service_tier": null,
 | |
|         "system_fingerprint": null,
 | |
|         "usage": {
 | |
|           "completion_tokens": 156,
 | |
|           "prompt_tokens": 20,
 | |
|           "total_tokens": 176,
 | |
|           "completion_tokens_details": {
 | |
|             "accepted_prediction_tokens": 0,
 | |
|             "audio_tokens": 0,
 | |
|             "reasoning_tokens": 128,
 | |
|             "rejected_prediction_tokens": 0
 | |
|           },
 | |
|           "prompt_tokens_details": {
 | |
|             "audio_tokens": 0,
 | |
|             "cached_tokens": 0
 | |
|           }
 | |
|         },
 | |
|         "prompt_filter_results": [
 | |
|           {
 | |
|             "prompt_index": 0,
 | |
|             "content_filter_results": {}
 | |
|           }
 | |
|         ]
 | |
|       }
 | |
|     },
 | |
|     "is_streaming": false
 | |
|   }
 | |
| }
 |