mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
# What does this PR do? Fireworks doesn't allow repsonse_format with tool use. The default response format is 'text' anyway, so we can safely omit. ## Test Plan Below script failed without the change, runs after. ``` #!/usr/bin/env python3 """ Script to test Responses API with kubernetes-mcp-server. This script: 1. Connects to the llama stack server 2. Uses the Responses API with MCP tools 3. Asks for the list of Kubernetes namespaces using the kubernetes-mcp-server """ import json from openai import OpenAI # Connect to the llama stack server base_url = "http://localhost:8321/v1" client = OpenAI(base_url=base_url, api_key="fake") # Define the MCP tool pointing to the kubernetes-mcp-server # The kubernetes-mcp-server is running on port 3000 with SSE endpoint at /sse mcp_server_url = "http://localhost:3000/sse" tools = [ { "type": "mcp", "server_label": "k8s", "server_url": mcp_server_url, } ] # Create a response request asking for k8s namespaces print("Sending request to list Kubernetes namespaces...") print(f"Using MCP server at: {mcp_server_url}") print("Available tools will be listed automatically by the MCP server.") print() response = client.responses.create( # model="meta-llama/Llama-3.2-3B-Instruct", # Using the vllm model model="fireworks/accounts/fireworks/models/llama4-scout-instruct-basic", # model="openai/gpt-4o", input="what are all the Kubernetes namespaces? Use tool call to `namespaces_list`. make sure to adhere to the tool calling format UNDER ALL CIRCUMSTANCES.", tools=tools, stream=False, ) print("\n" + "=" * 80) print("RESPONSE OUTPUT:") print("=" * 80) # Print the output for i, output in enumerate(response.output): print(f"\n[Output {i + 1}] Type: {output.type}") if output.type == "mcp_list_tools": print(f" Server: {output.server_label}") print(f" Tools available: {[t.name for t in output.tools]}") elif output.type == "mcp_call": print(f" Tool called: {output.name}") print(f" Arguments: {output.arguments}") print(f" Result: {output.output}") if output.error: print(f" Error: {output.error}") elif output.type == "message": print(f" Role: {output.role}") print(f" Content: {output.content}") print("\n" + "=" * 80) print("FINAL RESPONSE TEXT:") print("=" * 80) print(response.output_text) ```
527 lines
16 KiB
JSON
527 lines
16 KiB
JSON
{
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "https://api.fireworks.ai/inference/v1/v1/models",
|
|
"headers": {},
|
|
"body": {},
|
|
"endpoint": "/v1/models",
|
|
"model": ""
|
|
},
|
|
"response": {
|
|
"body": [
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/flux-1-dev-fp8",
|
|
"created": 1729532889,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "FLUMINA_BASE_MODEL",
|
|
"supports_chat": false,
|
|
"supports_image_input": false,
|
|
"supports_tools": false
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/flux-kontext-max",
|
|
"created": 1750714611,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "FLUMINA_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": true,
|
|
"supports_tools": false
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/flux-kontext-pro",
|
|
"created": 1750488264,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "FLUMINA_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": true,
|
|
"supports_tools": false
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/sentientfoundation-serverless/models/dobby-mini-unhinged-plus-llama-3-1-8b",
|
|
"created": 1748467427,
|
|
"object": "model",
|
|
"owned_by": "sentientfoundation-serverless",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/sentientfoundation/models/dobby-unhinged-llama-3-3-70b-new",
|
|
"created": 1739563474,
|
|
"object": "model",
|
|
"owned_by": "sentientfoundation",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/gpt-oss-120b",
|
|
"created": 1754345600,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct",
|
|
"created": 1753211090,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 262144
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-30b-a3b-thinking-2507",
|
|
"created": 1753916446,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507",
|
|
"created": 1753124424,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 262144
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-235b-a22b-thinking-2507",
|
|
"created": 1753455434,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 262144
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-embedding-8b",
|
|
"created": 1755707090,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 40960
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-v3-0324",
|
|
"created": 1742827220,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 163840
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-v3p1-terminus",
|
|
"created": 1758586241,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 163840
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/kimi-k2-instruct",
|
|
"created": 1752259096,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/gpt-oss-20b",
|
|
"created": 1754345466,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/llama4-maverick-instruct-basic",
|
|
"created": 1743878495,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": true,
|
|
"supports_tools": true,
|
|
"context_length": 1048576
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/kimi-k2-instruct-0905",
|
|
"created": 1757018994,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 262144
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/glm-4p5",
|
|
"created": 1753809636,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-v3",
|
|
"created": 1735576668,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/llama-v3p3-70b-instruct",
|
|
"created": 1733442103,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-235b-a22b",
|
|
"created": 1745885249,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/glm-4p5-air",
|
|
"created": 1754089426,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-r1",
|
|
"created": 1737397673,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 163840
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/llama-v3p1-8b-instruct",
|
|
"created": 1721692808,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-r1-basic",
|
|
"created": 1742306746,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 163840
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-v3p1",
|
|
"created": 1755758988,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 163840
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/flux-1-schnell-fp8",
|
|
"created": 1729535376,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "FLUMINA_BASE_MODEL",
|
|
"supports_chat": false,
|
|
"supports_image_input": false,
|
|
"supports_tools": false
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/llama-v3p1-405b-instruct",
|
|
"created": 1721428386,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/llama4-scout-instruct-basic",
|
|
"created": 1743878279,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": true,
|
|
"supports_tools": true,
|
|
"context_length": 1048576
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-30b-a3b",
|
|
"created": 1745878133,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
"created": 1721287357,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 131072
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/deepseek-r1-0528",
|
|
"created": 1748456377,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 163840
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/mixtral-8x22b-instruct",
|
|
"created": 1713375508,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": true,
|
|
"context_length": 65536
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-30b-a3b-instruct-2507",
|
|
"created": 1753808388,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 262144
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen2p5-vl-32b-instruct",
|
|
"created": 1743392739,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": true,
|
|
"supports_tools": false,
|
|
"context_length": 128000
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/fireworks/models/qwen3-coder-30b-a3b-instruct",
|
|
"created": 1754063588,
|
|
"object": "model",
|
|
"owned_by": "fireworks",
|
|
"kind": "HF_BASE_MODEL",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false,
|
|
"context_length": 262144
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "accounts/tvergho-87e44d/models/debatecards-70b-ft-3epoch-dpo-v2",
|
|
"created": 1743381121,
|
|
"object": "model",
|
|
"owned_by": "tvergho-87e44d",
|
|
"kind": "HF_PEFT_ADDON",
|
|
"supports_chat": true,
|
|
"supports_image_input": false,
|
|
"supports_tools": false
|
|
}
|
|
}
|
|
],
|
|
"is_streaming": false
|
|
}
|
|
}
|