skip to content

As the lead of a company model gateway, would you adopt the chat-message request shape most providers accept or define your own, and when would you allow native pass-through?

level: principalimportance: should knowfreq 32%

answer

  1. who already speaks the shape?
  2. lowest common denominator breeds bypasses
  3. you follow, or you fork
  4. pass-through keeps custody, loses portability
  5. pass-through share as a health metric

basics

~20 s

Most companies adopt the widely accepted chat-message shape with namespaced extensions, define their own only when the common core blocks real features, and allow native pass-through per route for provider-only features, keeping key custody and caps but losing portability.

solid answer

~50 s

It depends on who calls the gateway and what they need. The chat-message shape most providers accept is cheap to adopt: existing client libraries and tools already speak it, so callers change a base address. Its costs are that its originator evolves it and you follow or fork, and that it carries little beyond the common core. A gateway-owned shape gives you a stable, versioned contract and room for typed content parts, but you write every adapter and client. Restricting either to what every provider supports creates demand for bypasses. So I usually adopt the common shape with a namespaced extension object, and allow native pass-through per route, opt-in and owned by the requesting team, for provider-only features. Pass-through keeps key custody, caps and raw logs; it loses portability, failover, normalised usage and uniform replay. I track its traffic share and review each route.

go deeper

for a junior

Recall that the gateway exposes one request shape and that most providers accept a common chat-message shape.

for a middle

Explain what adopting the common shape saves, what a gateway-owned shape adds, and why compatible endpoints still need adapters.

for a senior

Show what a pass-through route keeps and loses, and how the lowest-common-denominator trap drives teams toward bypasses.

for a principal

Own the call: the front-door shape, which extensions to standardise, who may open pass-through routes, how they are reviewed, and which metric says the shape is falling behind.

## The decision A shared model gateway exposes one request shape to every application. A lead has to choose what that shape is, and what happens when a team needs something the shape cannot express. There is no universally right answer; the choice depends on who the callers are, how many provider-only features matter to the product, and how much adapter work the platform team can carry. ## The options | option | what callers write | strengths | costs | |---|---|---|---| | adopt the common chat-message shape as-is | the shape most providers already accept | little client work; existing tools work | follows its originator's changes; thin beyond the core | | common shape plus namespaced extensions | that shape, plus a gateway-owned extension object | cheap adoption with room for more | extensions are yours to version and document | | gateway-owned shape | a contract the platform defines and versions | expressive, stable, provider-neutral | every adapter and client library is yours to build | | no shared shape: native routing only | each provider's own shape | nothing lost in translation | no portability; every app is provider-coupled | ## What decides it - **Who the callers are.** If most applications already use client libraries and tools that speak the common shape, adopting it often means they change only a base address and a key. A custom shape means writing and maintaining clients for every stack in the company. - **How much lies beyond the common core.** Typed content parts, reasoning output, citations, cache markers, multimodal input and output: the more of these the product needs, the less the core carries and the more pressure for extensions or a custom shape. - **Who controls evolution.** A de facto shape changes when its originator changes it. The gateway either follows, rewriting adapters on someone else's schedule, or forks and loses the benefit of compatibility. - **The lowest-common-denominator trap.** A shape restricted to features every provider supports looks portable, but it blocks teams from the feature that made them pick a provider. They then ask for bypasses, or call the provider directly and escape the gateway entirely. - **Compatible is not identical.** Providers advertising an endpoint compatible with the common shape still differ in parameters they accept, tool handling and stream details, so adapters are needed either way; the common shape saves client work, not adapter work. ## Native pass-through: what stays and what goes A **pass-through route** forwards the provider's native request and response almost untouched; the gateway swaps the credential and observes the traffic. | kept | lost | |---|---| | central custody of provider keys | portability: the request only works on one provider | | per-team caps, if the gateway parses that provider's usage | cross-provider failover to another provider's model | | access policy per team and route | normalised finish reasons, usage and stream events | | raw request and response logging | uniform records for bulk replay on another model | | one place to see all model traffic | the gateway's drop, reject or emulate policy | The kept column is why pass-through belongs **inside** the gateway rather than as permission to call providers directly: key custody, caps and visibility are what the gateway was built to provide. Caps and logging have their own design questions; here it is enough that pass-through does not have to give them up. ## When to allow a pass-through route 1. **A provider-only feature with real product value** that the shared shape cannot carry yet. 2. **A gap in time**: a new feature has shipped, and the shared shape will absorb it next quarter. 3. **Work that needs exact native behaviour**, such as reproducing a provider's own documented examples or isolating a translation bug. Govern it: pass-through is **opt-in per route**, owned by the team that asked, reviewed on a schedule ("is this feature in the shared shape yet?"), and measured. The **share of traffic on pass-through** is a health signal: rising means the shared shape is falling behind what teams need. A team on pass-through accepts that its code is coupled to one provider and owns the migration cost if it leaves; the broader lock-in argument for choosing one model supplier over another is a separate decision. ## A common landing point Many platforms end up with the common chat-message shape as the front door, a namespaced extension object for the features they choose to standardise, aliases for model names, and a small number of governed pass-through routes. It gets most callers on board at once, keeps the platform's adapter work bounded, and makes every exception visible instead of letting it leak out of the gateway.

  • What signal tells you the shared request shape is falling behind?
    A rising share of traffic on pass-through routes, repeated requests for the same extension, and teams found calling providers directly. Each pass-through route should name the feature it exists for; when several routes cite the same feature, standardise it in the extension object and retire those routes on a dated review.
  • Should the gateway still enforce per-team caps on a pass-through route?
    Yes, because unbounded spend is one of the main reasons the gateway exists, and pass-through must not become a way round it. That requires parsing each provider's native usage on those routes, which is adapter work the platform keeps even when it skips translation. If it cannot parse a provider's usage, it should not offer pass-through to that provider.

A shared shipping desk that uses the container size most carriers accept, plus labelled add-ons, and lets one team book a specialist carrier directly through the desk, still on the company account and still logged.

  • A gateway-owned shape is always better because it avoids any vendor's influence.
  • Limiting the shape to features every provider supports keeps everyone portable at no cost.
  • Native pass-through gives up nothing because the gateway still forwards the call.
  • Providers that advertise a compatible endpoint behave identically, so no adapters are needed.
  • Pass-through means the gateway can no longer hold keys or enforce budgets.