Skip to content

fix: broken context propagation to standalone run#7190

Merged
cnvergence merged 2 commits into
envoyproxy:mainfrom
codefromthecrypt:context-break
Oct 10, 2025
Merged

fix: broken context propagation to standalone run#7190
cnvergence merged 2 commits into
envoyproxy:mainfrom
codefromthecrypt:context-break

Conversation

@codefromthecrypt
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

#4451 added config reload, but added context.TODO instead of propagating the calling context.

This prevents context values or upstream cancelation signals from getting to func-e when run in standalone mode.

Release Notes: No

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt codefromthecrypt requested a review from a team as a code owner October 10, 2025 15:03
@arkodg arkodg requested a review from zirain October 10, 2025 15:11
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.09%. Comparing base (afaa7e3) to head (4f69809).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7190      +/-   ##
==========================================
- Coverage   71.10%   71.09%   -0.02%     
==========================================
  Files         228      228              
  Lines       40678    40678              
==========================================
- Hits        28926    28919       -7     
- Misses      10059    10065       +6     
- Partials     1693     1694       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cnvergence cnvergence merged commit c7cc6ce into envoyproxy:main Oct 10, 2025
32 checks passed
mathetake added a commit to envoyproxy/ai-gateway that referenced this pull request Oct 10, 2025
**Description**

Before we silenced logs, but silenced envoy in the process. This uses a
new feature of func-e to propagate stdout/stderr directly to envoy.

```bash
$ OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=unused out/aigw-darwin-arm64 run --mcp-json '{
  "mcpServers": {
    "kiwi": {
      "type": "http",
      "url": "https://mcp.kiwi.com"
    }
  }
}'
[2025-10-10 13:00:17.025][1758986][warning][config] [source/server/options_impl_platform_default.cc:9] CPU number provided by HW thread count (instead of cpuset).
Envoy AI Gateway listening on http://localhost:1975 (admin http://localhost:60810) after 32.7s
{"bytes_received":92,"bytes_sent":0,"connection_termination_details":null,"downstream_local_address":"127.0.0.1:1975","downstream_remote_address":"127.0.0.1:60837","duration":43751,"genai_backend_name":null,"genai_model_name":"mistral:latest","genai_model_name_override":null,"genai_tokens_input":null,"genai_tokens_output":null,"mcp_backend":null,"mcp_method":null,"mcp_request_id":null,"mcp_session_id":null,"method":"POST","response_code":0,"start_time":"2025-10-10T17:00:41.507Z","upstream_cluster":"httproute/default/aigw-run/rule/0","upstream_host":"172.19.1.1:11434","upstream_local_address":"172.19.207.31:60838","upstream_transport_failure_reason":null,"user-agent":"curl/8.7.1","x-envoy-origin-path":"/v1/chat/completions","x-request-id":"5903da33-c572-4373-8262-c088c9f904f9"}
```

**Related Issues/PRs (if applicable)**

depends on envoyproxy/gateway#7190

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@codefromthecrypt codefromthecrypt deleted the context-break branch October 13, 2025 09:24
nutanix-Hrushikesh pushed a commit to nutanix-Hrushikesh/ai-gateway that referenced this pull request Oct 16, 2025
**Description**

Before we silenced logs, but silenced envoy in the process. This uses a
new feature of func-e to propagate stdout/stderr directly to envoy.

```bash
$ OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=unused out/aigw-darwin-arm64 run --mcp-json '{
  "mcpServers": {
    "kiwi": {
      "type": "http",
      "url": "https://mcp.kiwi.com"
    }
  }
}'
[2025-10-10 13:00:17.025][1758986][warning][config] [source/server/options_impl_platform_default.cc:9] CPU number provided by HW thread count (instead of cpuset).
Envoy AI Gateway listening on http://localhost:1975 (admin http://localhost:60810) after 32.7s
{"bytes_received":92,"bytes_sent":0,"connection_termination_details":null,"downstream_local_address":"127.0.0.1:1975","downstream_remote_address":"127.0.0.1:60837","duration":43751,"genai_backend_name":null,"genai_model_name":"mistral:latest","genai_model_name_override":null,"genai_tokens_input":null,"genai_tokens_output":null,"mcp_backend":null,"mcp_method":null,"mcp_request_id":null,"mcp_session_id":null,"method":"POST","response_code":0,"start_time":"2025-10-10T17:00:41.507Z","upstream_cluster":"httproute/default/aigw-run/rule/0","upstream_host":"172.19.1.1:11434","upstream_local_address":"172.19.207.31:60838","upstream_transport_failure_reason":null,"user-agent":"curl/8.7.1","x-envoy-origin-path":"/v1/chat/completions","x-request-id":"5903da33-c572-4373-8262-c088c9f904f9"}
```

**Related Issues/PRs (if applicable)**

depends on envoyproxy/gateway#7190

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Hrushikesh Patil <hrushikesh.patil@nutanix.com>
nutanix-Hrushikesh pushed a commit to nutanix-Hrushikesh/ai-gateway that referenced this pull request Oct 16, 2025
**Description**

Before we silenced logs, but silenced envoy in the process. This uses a
new feature of func-e to propagate stdout/stderr directly to envoy.

```bash
$ OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=unused out/aigw-darwin-arm64 run --mcp-json '{
  "mcpServers": {
    "kiwi": {
      "type": "http",
      "url": "https://mcp.kiwi.com"
    }
  }
}'
[2025-10-10 13:00:17.025][1758986][warning][config] [source/server/options_impl_platform_default.cc:9] CPU number provided by HW thread count (instead of cpuset).
Envoy AI Gateway listening on http://localhost:1975 (admin http://localhost:60810) after 32.7s
{"bytes_received":92,"bytes_sent":0,"connection_termination_details":null,"downstream_local_address":"127.0.0.1:1975","downstream_remote_address":"127.0.0.1:60837","duration":43751,"genai_backend_name":null,"genai_model_name":"mistral:latest","genai_model_name_override":null,"genai_tokens_input":null,"genai_tokens_output":null,"mcp_backend":null,"mcp_method":null,"mcp_request_id":null,"mcp_session_id":null,"method":"POST","response_code":0,"start_time":"2025-10-10T17:00:41.507Z","upstream_cluster":"httproute/default/aigw-run/rule/0","upstream_host":"172.19.1.1:11434","upstream_local_address":"172.19.207.31:60838","upstream_transport_failure_reason":null,"user-agent":"curl/8.7.1","x-envoy-origin-path":"/v1/chat/completions","x-request-id":"5903da33-c572-4373-8262-c088c9f904f9"}
```

**Related Issues/PRs (if applicable)**

depends on envoyproxy/gateway#7190

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Hrushikesh Patil <hrushikesh.patil@nutanix.com>
nutanix-Hrushikesh pushed a commit to nutanix-Hrushikesh/ai-gateway that referenced this pull request Oct 16, 2025
**Description**

Before we silenced logs, but silenced envoy in the process. This uses a
new feature of func-e to propagate stdout/stderr directly to envoy.

```bash
$ OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=unused out/aigw-darwin-arm64 run --mcp-json '{
  "mcpServers": {
    "kiwi": {
      "type": "http",
      "url": "https://mcp.kiwi.com"
    }
  }
}'
[2025-10-10 13:00:17.025][1758986][warning][config] [source/server/options_impl_platform_default.cc:9] CPU number provided by HW thread count (instead of cpuset).
Envoy AI Gateway listening on http://localhost:1975 (admin http://localhost:60810) after 32.7s
{"bytes_received":92,"bytes_sent":0,"connection_termination_details":null,"downstream_local_address":"127.0.0.1:1975","downstream_remote_address":"127.0.0.1:60837","duration":43751,"genai_backend_name":null,"genai_model_name":"mistral:latest","genai_model_name_override":null,"genai_tokens_input":null,"genai_tokens_output":null,"mcp_backend":null,"mcp_method":null,"mcp_request_id":null,"mcp_session_id":null,"method":"POST","response_code":0,"start_time":"2025-10-10T17:00:41.507Z","upstream_cluster":"httproute/default/aigw-run/rule/0","upstream_host":"172.19.1.1:11434","upstream_local_address":"172.19.207.31:60838","upstream_transport_failure_reason":null,"user-agent":"curl/8.7.1","x-envoy-origin-path":"/v1/chat/completions","x-request-id":"5903da33-c572-4373-8262-c088c9f904f9"}
```

**Related Issues/PRs (if applicable)**

depends on envoyproxy/gateway#7190

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Hrushikesh Patil <hrushikesh.patil@nutanix.com>
missBerg pushed a commit to missBerg/ai-gateway that referenced this pull request Dec 20, 2025
**Description**

Before we silenced logs, but silenced envoy in the process. This uses a
new feature of func-e to propagate stdout/stderr directly to envoy.

```bash
$ OPENAI_BASE_URL=http://localhost:11434/v1 OPENAI_API_KEY=unused out/aigw-darwin-arm64 run --mcp-json '{
  "mcpServers": {
    "kiwi": {
      "type": "http",
      "url": "https://mcp.kiwi.com"
    }
  }
}'
[2025-10-10 13:00:17.025][1758986][warning][config] [source/server/options_impl_platform_default.cc:9] CPU number provided by HW thread count (instead of cpuset).
Envoy AI Gateway listening on http://localhost:1975 (admin http://localhost:60810) after 32.7s
{"bytes_received":92,"bytes_sent":0,"connection_termination_details":null,"downstream_local_address":"127.0.0.1:1975","downstream_remote_address":"127.0.0.1:60837","duration":43751,"genai_backend_name":null,"genai_model_name":"mistral:latest","genai_model_name_override":null,"genai_tokens_input":null,"genai_tokens_output":null,"mcp_backend":null,"mcp_method":null,"mcp_request_id":null,"mcp_session_id":null,"method":"POST","response_code":0,"start_time":"2025-10-10T17:00:41.507Z","upstream_cluster":"httproute/default/aigw-run/rule/0","upstream_host":"172.19.1.1:11434","upstream_local_address":"172.19.207.31:60838","upstream_transport_failure_reason":null,"user-agent":"curl/8.7.1","x-envoy-origin-path":"/v1/chat/completions","x-request-id":"5903da33-c572-4373-8262-c088c9f904f9"}
```

**Related Issues/PRs (if applicable)**

depends on envoyproxy/gateway#7190

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Erica Hughberg <erica.sundberg.90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants