Skip to content

Composition idea: passthrough mode for structured tool-call payloads (UEA integration) #93

Description

@MajidAsghariTabrizi

Context

opencode-llm-proxy translates between API formats (OpenAI and Anthropic and Gemini) including tool/function calling. UEA (MajidAsghariTabrizi/universal-engineering-agent) routes through proxies like this one and sends structured payloads via tool calls - failure classifications, verification verdicts, checkpoint data - that contain fields the proxy's translation layer might not expect.

The Problem

UEA's tool calls include structured JSON payloads with fields like:

  • \uh_classify\ returns { message, code, hint } with 10-class error taxonomy
  • \uh_verify\ returns multi-stage structured verdicts with failureClass and stage
  • \uh_context_build\ returns ranked context bundles with budget metadata

When opencode-llm-proxy translates this through different API formats, the tool_use to tool_call conversion may reorder fields, flatten nested objects, or drop additionalProperties that UEA's tools define but the proxy does not recognize.

Proposal: Structured Payload Passthrough Mode

Add a passthrough option for specific tool names that tells the proxy to not translate the tool call arguments/response - just forward them as-is:

  • passthrough_tools: [uh_classify, uh_verify, uh_context_build, uh_mission, uh_checkpoint, uh_memory, uh_*]

When a tool name matches passthrough_tools, the proxy preserves the original JSON structure verbatim, does not re-serialize the response through format conversion, and adds an X-Passthrough: true header for debugging.

Why This Helps

  • Zero-downtime composition: UEA and any tool-heavy agent can route through the proxy without silent payload corruption
  • Debugging: X-Passthrough header makes it obvious which tools bypassed translation
  • Backward compatible: Default behavior unchanged; passthrough is opt-in per tool
  • Broader benefit: Any coding agent that sends structured data via tool calls benefits from this

See Also

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions