diff --git a/inference-platforms/agent.py b/inference-platforms/agent.py index 62bc6b7..276c3d5 100644 --- a/inference-platforms/agent.py +++ b/inference-platforms/agent.py @@ -49,10 +49,10 @@ async def run_agent(tools: list[Tool]): async def main(): - mcp_url = os.getenv("MCP_URL", "https://mcp.kiwi.com") async with MCPServerStreamableHttp( { - "url": mcp_url, + "url": os.getenv("MCP_URL", "https://mcp.kiwi.com"), + "headers": dict(h.split("=", 1) for h in os.getenv("MCP_HEADERS", "").split(",") if h), "timeout": 30.0, }, client_session_timeout_seconds=60.0, diff --git a/inference-platforms/aigw/README.md b/inference-platforms/aigw/README.md index 3428c67..4f29685 100644 --- a/inference-platforms/aigw/README.md +++ b/inference-platforms/aigw/README.md @@ -31,8 +31,7 @@ Start Ollama and your OpenTelemetry Collector via this repository's [README](../ ## Run Envoy AI Gateway ```bash -docker compose pull -docker compose up --force-recreate --remove-orphans +docker compose up --force-recreate --pull always --remove-orphans --wait -d ``` Clean up when finished, like this: diff --git a/inference-platforms/aigw/docker-compose.yml b/inference-platforms/aigw/docker-compose.yml index 33ba790..eb597d6 100644 --- a/inference-platforms/aigw/docker-compose.yml +++ b/inference-platforms/aigw/docker-compose.yml @@ -34,6 +34,7 @@ services: env_file: - env.local environment: + - OTEL_SERVICE_NAME=aigw - OPENAI_BASE_URL=http://host.docker.internal:11434/v1 - OTEL_EXPORTER_OTLP_ENDPOINT=http://host.docker.internal:4318 ports: diff --git a/inference-platforms/aigw/env.local b/inference-platforms/aigw/env.local index 5e58ab2..6cf23b7 100644 --- a/inference-platforms/aigw/env.local +++ b/inference-platforms/aigw/env.local @@ -4,8 +4,12 @@ OPENAI_API_KEY=unused CHAT_MODEL=qwen3:0.6b AGENT_MODEL=qwen3:1.7b +# Override as necessary for MCP proxying +MCP_URL=https://mcp.kiwi.com +MCP_HEADERS= + # OpenTelemetry configuration -OTEL_SERVICE_NAME=aigw +OTEL_SERVICE_NAME=openai-agent OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf OTEL_TRACES_EXPORTER=otlp