mirror of
				https://github.com/meta-llama/llama-stack.git
				synced 2025-10-25 09:05:37 +00:00 
			
		
		
		
	# What does this PR do? - implement get_api_key instead of relying on LiteLLMOpenAIMixin.get_api_key - remove use of LiteLLMOpenAIMixin - add default initialize/shutdown methods to OpenAIMixin - remove __init__s to allow proper pydantic construction - remove dead code from vllm adapter and associated / duplicate unit tests - update vllm adapter to use openaimixin for model registration - remove ModelRegistryHelper from fireworks & together adapters - remove Inference from nvidia adapter - complete type hints on embedding_model_metadata - allow extra fields on OpenAIMixin, for model_store, __provider_id__, etc - new recordings for ollama - enhance the list models error handling - update cerebras (remove cerebras-cloud-sdk) and anthropic (custom model listing) inference adapters - parametrized test_inference_client_caching - remove cerebras, databricks, fireworks, together from blanket mypy exclude - removed unnecessary litellm deps ## Test Plan ci
		
			
				
	
	
		
			104 lines
		
	
	
	
		
			2.9 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
			
		
		
	
	
			104 lines
		
	
	
	
		
			2.9 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
| {
 | |
|   "test_id": "tests/integration/agents/test_agents.py::test_custom_tool[ollama/llama3.2:3b-instruct-fp16]",
 | |
|   "request": {
 | |
|     "method": "POST",
 | |
|     "url": "http://0.0.0.0:11434/v1/v1/chat/completions",
 | |
|     "headers": {},
 | |
|     "body": {
 | |
|       "model": "llama3.2:3b-instruct-fp16",
 | |
|       "messages": [
 | |
|         {
 | |
|           "role": "system",
 | |
|           "content": "You are a helpful assistant"
 | |
|         },
 | |
|         {
 | |
|           "role": "user",
 | |
|           "content": "What is the boiling point of the liquid polyjuice in celsius?"
 | |
|         }
 | |
|       ],
 | |
|       "max_tokens": 512,
 | |
|       "stream": true,
 | |
|       "temperature": 0.0001,
 | |
|       "tool_choice": "auto",
 | |
|       "tools": [
 | |
|         {
 | |
|           "type": "function",
 | |
|           "function": {
 | |
|             "name": "get_boiling_point",
 | |
|             "description": "Returns the boiling point of a liquid in Celcius or Fahrenheit."
 | |
|           }
 | |
|         }
 | |
|       ],
 | |
|       "top_p": 0.9
 | |
|     },
 | |
|     "endpoint": "/v1/chat/completions",
 | |
|     "model": "llama3.2:3b-instruct-fp16"
 | |
|   },
 | |
|   "response": {
 | |
|     "body": [
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-234603185e85",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": "",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": "assistant",
 | |
|                 "tool_calls": [
 | |
|                   {
 | |
|                     "index": 0,
 | |
|                     "id": "call_fkdqo820",
 | |
|                     "function": {
 | |
|                       "arguments": "{\"liquid\":\"polyjuice\",\"unit\":\"celsius\"}",
 | |
|                       "name": "get_boiling_point"
 | |
|                     },
 | |
|                     "type": "function"
 | |
|                   }
 | |
|                 ]
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "llama3.2:3b-instruct-fp16",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": null,
 | |
|           "system_fingerprint": "fp_ollama",
 | |
|           "usage": null
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-234603185e85",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": "",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": "assistant",
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": "tool_calls",
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "llama3.2:3b-instruct-fp16",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": null,
 | |
|           "system_fingerprint": "fp_ollama",
 | |
|           "usage": null
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "is_streaming": true
 | |
|   }
 | |
| }
 |