Research

Orchestrations v1: a public architecture for observable model-tool runs

A public architecture and measurement note for a gateway-native streaming model-and-tool orchestration protocol.

Read article22 min read
Orchestrations v1 cover

Research summary

We designed /v1/orchestrations as a public protocol for agent runtimes. A model request, tool discovery, tool calls, tool results, reasoning increments, and final output are represented as a stream-consumable orchestration object. This note records the public contract, the event projection, and the limited performance evidence available at publication.

The protocol is not a claim that a wrapper makes a model intrinsically faster. Its job is to consolidate authentication, policy, routing, metering, and logging boundaries across model providers. Provider queueing, prefill, and first-token decoding remain governed by the model service, request shape, cache state, and network path.

1. Public protocol boundary

The public surface consists of POST /v1/orchestrations, POST /v1/orchestrations/compact, and a WebSocket session on the same path. The primary object uses the orch_ prefix and the orchestration type, with the states queued, in_progress, completed, failed, and incomplete. These identifiers are a client contract; they must not expose provider, region, account, or internal runtime topology.

Agent / Vauix clientJSON, SSE or WebSocketAPI gatewayUnified authenticationpolicy and routing/v1/orchestrationsprotocol runtimeModel routerselected modelUnified result / streamorchestration.* projection统一对象、事件命名空间与客户端可观察状态
图 1. 公开参考架构。网关先统一鉴权、策略与路由;运行时再规范化输入与工具,最后把模型结果投影为独立的 orchestration.* 事件。客户端消费的是公开契约,而不是路由模型的原生事件格式。

Inputs cover the model, instructions, input, tools, tool choice, parallel tool calls, reasoning, storage, streaming, inclusion options, service tier, prompt-cache hint, text options, and client metadata. Public metadata is normalized before it reaches the contract. Authorization context, proxy requests, sensitive fields, and runtime log objects are not model input and are not returned in the public response.

2. Streaming events and tools

Both SSE event: values and JSON type values use the orchestration.* namespace. Before final text, a client can observe creation, output-item creation and completion, text deltas, tool-argument deltas and completion, reasoning-summary deltas, metadata, and terminal events. Providers need not offer every event class; the stable promise is the event meaning and recovery behavior, not artificial equivalence between providers.

The tool surface supports functions, namespaces, tool_search, custom tools, and custom call/result items. Namespaces group capabilities by domain. tool_search permits discovery before delayed injection, reducing initial schema pressure. MCP may supply a catalogue or execution backend, while Orchestrations owns the state of one model-and-tool turn and its user-facing event projection.

3. Latency model and observations

We separate time to first visible text into ingress, authentication and policy, normalization, routing, provider queueing, model prefill, first decode, stream transformation, and network delivery. The protocol’s direct additions are normalization and event projection. They are expected to scale with request and event size, but they remain measurements to make—not a basis for an unqualified latency claim.

T_TTFT = T_ingress + T_auth_policy + T_normalize + T_route + T_provider_queue + T_model_prefill + T_first_decode + T_stream_transform + T_network

Ingress6%Auth / policy8%Normalize7%Route5%Provider queue30%Model prefill20%First decode16%Stream transform5%Network10%
图 2. 首文本增量延迟的分解模型。比例块用于展示责任边界而非测得占比:模型服务、排队、prefill 与首 token 解码通常主导;协议层主要增加规范化与事件投影,仍必须以受控基准验证。

SSE enables rendering before a response is complete; it does not promise lower total completion time. tool_search trades a discovery turn for a smaller initial declaration. A prompt-cache key is a routing hint rather than a guaranteed hit. Compaction can reduce later prefill work while consuming a service or model budget itself. Comparisons therefore need the same model, region, concurrency, token budget, and cache conditions.

4. Local data-plane measurement

On 14 July 2026, we issued six serial, short, tool-free requests to vauix/deepseek-v4-flash: three JSON and three SSE. The path was the primary node’s local LiteLLM data plane, bypassing public domains, edge gateways, and cross-host networking. The observation establishes that the local protocol path completed an event loop; it is not a production SLA or a percentile study.

总时延
2942 msJSON 1
1858 msJSON 2
242 msJSON 3
237 msSSE 1
214 msSSE 2
1550 msSSE 3
图 3. 2026-07-14 主节点同机内网、短输入、单并发、无工具的六次真实请求。蓝色为 JSON,绿色为 SSE;仅三次/形态,展示连通性与波动,不支持 P95/P99 或生产 SLA 结论。

All JSON requests succeeded. All SSE requests completed the common event sequence, including creation, progress, output/content-item updates, text deltas, corresponding done events, and completion. The small sample showed earlier observable SSE increments but also meaningful run-to-run variation. We report it as connectivity and instrumentation evidence only.

形态运行HTTP / 状态响应头 / 首体字节 msTTFT ms总时延 msToken / 响应字节
JSON1200 / completed2,941 / —2,9429 / 22 / 31
JSON2200 / completed1,858 / —1,8589 / 22 / 31
JSON3200 / completed242 / —2429 / 22 / 31
SSE1200 / 完整事件流138 / 1401602372,992 bytes
SSE2200 / 完整事件流117 / 1201402142,992 bytes
SSE3200 / 完整事件流1,435 / 1,4371,4781,5502,992 bytes

5. Relationship to other interfaces

Object lifecycles, typed SSE events, function and custom tools, parallel calls, cache hints, service tiers, and storage controls have useful precedents in established model APIs. We treat them as compatibility lessons, not as a hidden dependency: the public object, event namespace, and release cadence remain Orchestrations’ own. Message-oriented and function-calling APIs can be routed behind the same control plane; MCP is complementary rather than competitive.

6. Reliability and security boundary

Clients must handle failed and incomplete; absence of an error event is not success. Whether a tool call can be retried depends on call identity, idempotency, and host policy. Namespaces and delayed discovery reduce exposure, but do not replace identity checks, authorization, parameter validation, audit, or least privilege. Additive event evolution and ignoring unknown events preserve client resilience; removals and semantic changes require versioning or a deprecation period.

7. Verification status

Implementation records include regression assertions for object and event mapping, reasoning-summary indexing, route classification, internal-metadata removal, tool-message ordering, and tool-search materialization. We did not count the local Python test suite as newly rerun: the local virtual environment failed before collection because the standard-library encodings module was unavailable. Publication therefore distinguishes recorded assertions from a clean re-verification.

Next, we will run conformance fixtures for JSON, SSE, and WebSocket in a locked environment; test cancellation and broken streams; test tool idempotency and permission denials; and publish aggregated performance data under fixed conditions.

8. Conclusion

Orchestrations v1 is an observable protocol for a model-and-tool turn. The gateway absorbs provider variation, the runtime normalizes inputs and tool flow, and clients consume stable objects and events. Local observations show that both JSON and SSE paths complete and that SSE can expose text earlier. They do not establish global throughput, latency, or cost superiority.