Skip to content

Gateway OpenAI Compatibility

The v4.2 gateway implements a minimal OpenAI-compatible local mock subset. It is intended for protocol validation, client setup previews, and local tests. It is not full OpenAI API compatibility.

Compatibility Matrix

SurfaceStatusNotes
GET /healthsupportedLocal gateway health metadata, not an OpenAI endpoint.
GET /v1/modelssupportedLists executable mock models only. External provider models remain metadata-only.
POST /v1/chat/completionspartially supportedSupports basic chat completion requests against mock models.
Non-streaming chatsupportedDeterministic mock responses only.
SSE streamingsupportedDeterministic mock chunks ending with [DONE].
Request IDssupportedx-request-id is returned for traceability.
Usage objectpartially supportedMock provider returns deterministic usage; no provider tokenizer is used.
Toolspartially supportedMock tool-capable model metadata exists; no external tool execution occurs.
Images, audio, embeddingsintentionally unsupportedPlanned contract areas only.
Provider-specific extensionsintentionally unsupportedExternal providers are not executable in v4.2 development.
Live retry/fallbackintentionally unsupportedRetry and fallback are simulation-only.
Full OpenAI API parityplannedNot claimed by v4.2 Gateway Foundation.

Error Compatibility

Gateway errors use stable JSON responses with normalized error codes and HTTP status codes. Unsupported fields and malformed JSON fail explicitly. Public errors do not include stack traces, raw prompt bodies, authorization headers, bearer tokens, or provider credentials.

Streaming Compatibility

Streaming uses server-sent events with JSON chunks and a final data: [DONE] marker. Chunk content is deterministic mock output. Stream observability records chunk counts and lifecycle metadata, not chunk text.

Boundaries

  • Only mock models are executable.
  • External models are not advertised as callable through /v1/models.
  • No provider credentials are loaded.
  • No external provider request is made.
  • No live failover, retry execution, or provider health probing exists.

Released under the MIT License.