01Start with a narrow common interface

A gateway should begin with the smallest interface shared by the providers it supports. In practice, that often means a request containing messages, a model identifier, generation parameters, and a streaming preference.

The gateway can normalize the basic request shape, but it should not pretend that every provider accepts the same parameters. A parameter that exists for one model may be ignored, rejected, or interpreted differently by another.

A practical design is to separate three layers:

  • A common request and response format for ordinary application code.
  • Capability metadata describing what a model actually supports.
  • An escape hatch for provider-specific options when the common format is not enough.