ChatCompat
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:10
How one OpenAI-compatible server or model differs from OpenAI’s own Chat Completions API.
Properties
Section titled “Properties”cacheBreakpoints?
Section titled “cacheBreakpoints?”
readonlyoptionalcacheBreakpoints?:boolean
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:35
Whether the model takes explicit cache breakpoints (prompt_cache_breakpoint on content parts and
prompt_cache_options), which OpenAI supports from gpt-5.6. Defaults to false, which leaves caching to the
server’s automatic prefix cache.
maxTokensField?
Section titled “maxTokensField?”
readonlyoptionalmaxTokensField?:"max_tokens"|"max_completion_tokens"
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:15
The body field that carries the output limit. Defaults to "max_completion_tokens"; OpenAI deprecates
max_tokens and says reasoning models do not accept it, but many compatible servers read only max_tokens.
promptCacheRetention?
Section titled “promptCacheRetention?”
readonlyoptionalpromptCacheRetention?:boolean
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:40
Whether cacheRetention: "long" sends prompt_cache_retention: "24h", for models before gpt-5.6 that offer
extended caching. Defaults to false.
streamUsage?
Section titled “streamUsage?”
readonlyoptionalstreamUsage?:boolean
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:22
Whether to ask for a final usage chunk with stream_options: { include_usage: true }. Defaults to true. A
server that rejects the field needs false, and its replies then report no usage.
strictTools?
Section titled “strictTools?”
readonlyoptionalstrictTools?:boolean
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:24
Whether tools are sent with strict: true when their schema allows it. Defaults to true.
systemRole?
Section titled “systemRole?”
readonlyoptionalsystemRole?:"system"|"developer"
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:17
The role the system prompt is sent as. Defaults to "system", which every compatible server reads.
temperature?
Section titled “temperature?”
readonlyoptionaltemperature?:boolean
Defined in: packages/gateway/src/adapters/openai-chat/compat.ts:29
Whether the model accepts temperature. Defaults to true; with false, a temperature you set is not sent and
the call streams a warning.
These docs are licensedCC BY 4.0. Thelicence text is in the repository.