Skip to content

feat(js/plugins/compat-oai): add gpt-6-astra to the OpenAI model catalog - #6303

Merged
cabljac merged 1 commit into
mainfrom
feat/compat-oai-gpt-6-astra
Sep 9, 2026
Merged

cabljac merged 1 commit into
mainfrom
feat/compat-oai-gpt-6-astra

Conversation

@cabljac

@cabljac cabljac commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

gpt-6-astra currently falls through the dynamic gpt-${string} path, so the registered action and listActions carry the default model info, and the Dev UI advertises tool support the model does not have on this endpoint. This adds an explicit gpt-6-astra ref to SUPPORTED_GPT_MODELS, mirroring how gpt-5.5 was added. Note that openAI.model('gpt-6-astra') still returns generic info; that helper never consults the catalog for any model, so only the registered action and listActions change here.

The ref takes GPT_5_MODEL_INFO with tools: false. A live run against /v1/chat/completions with a single function tool returned:

400 Function tools with reasoning_effort are not supported for gpt-6-astra in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'.

The same error came back at low and xhigh, and reasoning_effort: 'none' was itself rejected (Supported values are: 'low', 'medium', 'high', and 'xhigh'). So no value lets tools through on this endpoint. The model page lists function calling as supported without an endpoint caveat, so this looks like a Chat Completions restriction that could lift; worth re-checking when the Responses API lands in JS. In JS, core treats supports.tools as advisory (a warning, tools still sent), so the entry changes what is advertised, not what is transmitted.

Text, streaming, structured JSON output (json_schema without strict), image input, system role, multiturn and maxOutputTokens all worked live.

Tests in tests/openai_test.ts pin the catalog entry and the action metadata produced from it. pnpm build and pnpm test in js/plugins/compat-oai pass (7 suites, 101 tests); prettier is clean.

Caveats: the endpoint accepts reasoning_effort low, medium, high and xhigh only; max and none are rejected. temperature other than 1 and top_p are rejected. The plugin only sends those when a caller sets them. No typed reasoningEffort config was added; the existing passthrough covers it. Go counterpart: #6304. The gpt-5.6-sol/terra/luna family that Go carries is still missing from the JS catalog; see #5898.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request adds support for the new gpt-6-astra model to the OpenAI compatibility plugin, along with corresponding unit tests. Feedback highlights that the reasoning_effort configuration parameter is currently missing from the OpenAIChatCompletionConfigSchema, which will cause Zod to strip it during validation in real-world usage. Additionally, the value 'max' used in the tests is invalid; the schema and tests should be updated to support and use the valid OpenAI values: 'low', 'medium', or 'high'.

@cabljac
cabljac force-pushed the feat/compat-oai-gpt-6-astra branch from 73fc540 to b8d8157 Compare September 8, 2026 15:53
@cabljac
cabljac force-pushed the feat/compat-oai-gpt-6-astra branch from b8d8157 to c3e1269 Compare September 8, 2026 17:15
cabljac added a commit to genkit-ai/genkit-dart that referenced this pull request Sep 9, 2026
gpt-6-astra fell through the default GPT heuristics, which advertised
tools: true and media: false. Live runs against /v1/chat/completions
(genkit-ai/genkit#6303) show the opposite: function tools are rejected
with 400 at every accepted reasoning_effort, and none is itself rejected,
so no value lets tools through. Image input, system role, multiturn,
streaming and json_schema output work.

Add a _Gpt6AstraModelCapabilities profile (tools false, media true,
multiturn and systemRole true) matched by ^gpt-6-astra(?:-|$) so dated
snapshots and suffixed variants get the same metadata. The request
builder still forwards tools unconditionally; supports.tools is advisory
for the Dev UI and model refs, as it is for every other model here.

Add a reasoningEffort option (none, minimal, low, medium, high, xhigh)
to OpenAIChatOptions and forward it as reasoning_effort through an
explicit switch, so a value outside the enum fails with INVALID_ARGUMENT
instead of reaching the API as the SDK's unknown sentinel. gpt-6-astra
accepts low, medium, high and xhigh, and rejects none and max; it also
rejects temperature other than 1 and top_p, which the plugin only sends
when set.

Tests pin the astra supports map for the bare id, a dated snapshot and a
suffixed variant, that fine-tune ids keep the default profile, the option
enum in the JSON schema, reasoning_effort on the wire, rejection of an
unknown effort before any request, and that a default request carries no
temperature, top_p or reasoning_effort while tools still reach the wire.
No live smoke was run from Dart.
gpt-6-astra fell through the dynamic gpt-* path and was registered with
default model info, so listActions and the Dev UI advertised tool
support. Add an explicit catalog entry that declares tools: false.

A live run against /v1/chat/completions rejected function tools for this
model at every accepted reasoning_effort value with a 400 that points at
/v1/responses, and reasoning_effort none was itself rejected, so no value
lets tools through. This plugin only speaks Chat Completions. Core treats
supports.tools as advisory in JS, so the entry changes what is advertised
and warned about, not what is sent.

Text, streaming, structured JSON output, image input, system role and
multiturn worked live. The endpoint accepts reasoning_effort low, medium,
high and xhigh only.

Tests pin the catalog entry and the action metadata built from it.
@cabljac
cabljac force-pushed the feat/compat-oai-gpt-6-astra branch from c3e1269 to cfdc708 Compare September 9, 2026 08:30

@adesinah adesinah left a comment

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 looks good to me. One thing i noticed (non-blocking for this PR) is JS has no gpt-5.6 entries at all like the Go does, which means the curated lists are drifting apart across ecosystems.

@cabljac

cabljac commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Agreed on the gpt-5.6 drift; it is tracked in #5898 and out of scope here.

@cabljac
cabljac marked this pull request as ready for review September 9, 2026 10:24
@cabljac
cabljac requested a review from pavelgj September 9, 2026 10:28
@cabljac
cabljac merged commit 9b9bee7 into main Sep 9, 2026
13 checks passed
@cabljac
cabljac deleted the feat/compat-oai-gpt-6-astra branch September 9, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants