Skip to content

Document OpenAI API defaults - #791

Merged
Rachael-Graham merged 10 commits into
mainfrom
model-config
Dec 3, 2026
Merged

Rachael-Graham merged 10 commits into
mainfrom
model-config

Conversation

@Rachael-Graham

Copy link
Copy Markdown
Contributor

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>
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>
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview

Link Points at
Branch preview The newest push to this branch. Updates in place.
Commit preview 298072e only. Frozen.

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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three problems with this sentence:

  1. "after this changes" is vague. The reader can't tell what changed. It means "after you set apiFormat to chatCompletions."
  2. 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.
  3. The same translator also rejects any openAI option other than baseUrl and apiFormat (line 177). So setting other providers.openAI.config values, such as headers or temperature, also breaks codex agents on default-model-config. The about page tells readers to set providers.openAI.config without that warning.
Suggested change
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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
## Choose an API format
## Choose an API format {#choose-an-api-format}

{{% /version %}}

## Configure a ModelConfig {#how-a-modelconfig-reaches-an-agent}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
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.

Signed-off-by: Rachael Graham <rachael.graham@solo.io>
@Rachael-Graham
Rachael-Graham merged commit 67ce33a into main Dec 3, 2026
4 checks passed
@Rachael-Graham
Rachael-Graham deleted the model-config branch December 3, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants