openclaw - 💡(How to fix) Fix Gateway v2 metadata: emit promotion-grade routing surface [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73895Fetched 2026-04-29 06:13:36
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1
RAW_BUFFERClick to expand / collapse

Gateway v2 metadata: emit promotion-grade routing surface

Problem

  • Benchmark-side smoke harness is ready, but OpenClaw gateway still does not emit the full promotion-grade v2 metadata surface.

Needed fields

  • requested_config
  • resolved_config
  • actual_config
  • route_class
  • fallback_chain
  • policy_id
  • policy_version
  • gateway_version
  • decision_trace or decision_trace_id
  • route_decision_ms
  • first_token_ms
  • total_ms
  • token usage including reasoning_tokens

Acceptance

  • Gateway emits the full routing/config lineage and timing/token breakdown above.
  • model_bench.py smoke-gateway-v2 can pass against live gateway output without stub-only mode.

Suggested implementation path

  • Emit the metadata from the gateway routing layer as part of the response envelope.
  • Preserve backward compatibility for existing callers.
  • Keep benchmark scoring out of scope; this is purely upstream instrumentation.

Context

  • Benchmark-side handoff doc already exists in the model-benchmark-lab workspace.

extent analysis

TL;DR

Emit the missing metadata fields from the gateway routing layer as part of the response envelope to ensure compatibility with the benchmark-side smoke harness.

Guidance

  • Review the gateway routing layer to identify where the missing metadata fields (e.g., requested_config, resolved_config, actual_config) can be emitted as part of the response envelope.
  • Ensure that the implementation preserves backward compatibility for existing callers to avoid disrupting current functionality.
  • Verify that the emitted metadata includes the full routing/config lineage and timing/token breakdown required for acceptance.
  • Test the updated gateway output against the model_bench.py smoke-gateway-v2 benchmark to confirm that it passes without stub-only mode.

Notes

The exact implementation details may vary depending on the specific architecture and technology stack used by the OpenClaw gateway, so careful consideration of the existing codebase and dependencies is necessary.

Recommendation

Apply workaround by modifying the gateway routing layer to emit the required metadata fields, as this approach directly addresses the identified issue and ensures compatibility with the benchmark-side smoke harness.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Gateway v2 metadata: emit promotion-grade routing surface [1 comments, 2 participants]