openai.internal.ChatCompat

Everything that differs between OpenAI-compatible endpoints, as data. `base_url` arrives already resolved by the wrapper (explicit option, then the named env var, then the provider default), so the core never reads env for it.

Reference version

Signature

class openai.internal.ChatCompat

Everything that differs between OpenAI-compatible endpoints, as data. base_url arrives already resolved by the wrapper (explicit option, then the named env var, then the provider default), so the core never reads env for it.

Source:<builtin>/openai/ns_internal/chat.bamlbytes 34327037

Fields

provider

string

base_url

string

path

string

api_key_env

string | null

api_key_required

bool

collapse_text_content

bool

inline_image_urls

bool

send_stream_options

bool

max_tokens_key

string

default_max_tokens

int | null

default_role

string

compat_query

map<string, string>

Static methods

function

new

(
provider: string,
base_url: string,
path: string = …,
api_key_env: string | null = …,
api_key_required: bool = …,
collapse_text_content: bool = …,
inline_image_urls: bool = …,
send_stream_options: bool = …,
max_tokens_key: string = …,
default_max_tokens: int | null = …,
default_role: string = …,
compat_query: map<string, string> | null = …
) -> openai.internal.ChatCompat

Every field defaults to the plain-OpenAI shape; a wrapper overrides the handful that differ.