Repository navigation
Document OpenAI API defaults - #791
Conversation
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Explain the default OpenAI model and API format, how to configure compatible endpoints, and the Responses API requirement for the codex runtime. Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Explain the default OpenAI model and API format, how to configure compatible endpoints, and the Responses API requirement for the codex runtime. Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Docs preview
Both are uploaded Worker versions and serve no production traffic. |
|
|
||
| The `default-model-config` ModelConfig that the installation creates for the `OpenAI` provider sets `apiFormat` to `responses`. To point `default-model-config` at a provider that serves the Responses API, set only the `providers.openAI.config.baseUrl` Helm value. If the provider serves only the Chat Completions API, also set `providers.openAI.config.apiFormat` to `chatCompletions`. | ||
|
|
||
| kagent rejects a ModelConfig for the `codex` runtime unless `apiFormat` is `responses`. Therefore, after this changes, agents on a `codex` Harness cannot use `default-model-config`. |
There was a problem hiding this comment.
Three problems with this sentence:
- "after this changes" is vague. The reader can't tell what changed. It means "after you set
apiFormattochatCompletions." - kagent doesn't reject the ModelConfig. The ModelConfig is accepted. The codex translator (
go/core/internal/translator/codex/compiler.go:171) returns a validation error when it compiles the agent, so the error appears on the Agent. - The same translator also rejects any
openAIoption other thanbaseUrlandapiFormat(line 177). So setting otherproviders.openAI.configvalues, such as headers or temperature, also breaks codex agents ondefault-model-config. The about page tells readers to setproviders.openAI.configwithout that warning.
| kagent rejects a ModelConfig for the `codex` runtime unless `apiFormat` is `responses`. Therefore, after this changes, agents on a `codex` Harness cannot use `default-model-config`. | |
| A `codex` Harness requires `apiFormat` to be `responses`, and accepts no other `openAI` setting except `baseUrl`. If you set `apiFormat` to `chatCompletions`, or set any other `providers.openAI.config` value, agents on a `codex` Harness cannot use `default-model-config`. |
| {{% version exclude-if="1.0.x" %}} | ||
| ## Choose an API format | ||
|
|
||
| Your provider must serve the OpenAI HTTP API that the ModelConfig's `openAI.apiFormat` field selects. When `apiFormat` is set to `chatCompletions`, the runtime posts to `/chat/completions` under `baseUrl`. When `apiFormat` is set to `responses`, the runtime posts to `/responses` under `baseUrl`. A ModelConfig that you create defaults to `chatCompletions`. |
There was a problem hiding this comment.
There's a double space in "set to chatCompletions". Also, the last sentence ("A ModelConfig that you create defaults to chatCompletions.") repeats openai.md line 51. A link to the settings table there would avoid the repetition.
| For the rest of the settings that the `openAI` block accepts, see [OpenAI]({{< link path="setup/model-providers/openai#openai-provider-settings" >}}). Not every compatible provider honors every setting, so check your provider's documentation before setting one. For every `openAI` field, including its type, default, and validation rules, see the [API reference]({{< link path="reference/api-ref#openaiconfig" >}}). | ||
|
|
||
| {{% version exclude-if="1.0.x" %}} | ||
| ## Choose an API format |
There was a problem hiding this comment.
Nit: about-model-providers.md links to this heading, so give it an explicit anchor. That way, a later heading edit won't silently break the link.
| ## Choose an API format | |
| ## Choose an API format {#choose-an-api-format} |
| {{% /version %}} | ||
|
|
||
| ## Configure a ModelConfig {#how-a-modelconfig-reaches-an-agent} | ||
|
|
There was a problem hiding this comment.
This paragraph packs six facts into the overview page: the model, the format, why, kagent runtime support, the Helm values, and the compatible-endpoint caveat. byo-openai.md then repeats most of them. I'd cut this down to the default and a link, then put the detail in one place, ideally openai.md, which already owns apiFormat:
| For the `OpenAI` provider, which is the default, `default-model-config` uses the `gpt-5-mini` model with the Responses API. To change either setting, or to point the default at an endpoint that serves only the Chat Completions API, see [Choose an API format]({{< link path="setup/model-providers/byo-openai#choose-an-api-format" >}}). |
Also, "set the providers.openAI.config Helm values" without a warning invites readers to add options that break codex agents. See my comment on byo-openai.md.
Explain the default OpenAI model and API format, how to configure compatible endpoints, and the Responses API requirement for the codex runtime.