Skip to content

feat(py/plugins/openai): add gpt-6-astra to the OpenAI model catalog - #6306

Merged
hilariie merged 2 commits into
mainfrom
feat/py-openai-gpt-6-astra
Sep 9, 2026
Merged

hilariie merged 2 commits into
mainfrom
feat/py-openai-gpt-6-astra

Conversation

@cabljac

@cabljac cabljac commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

gpt-6-astra only reaches the Python OpenAI plugin through dynamic resolution, which registers it with Supports(multiturn=True), so the Dev UI hides media, system role and JSON output. This adds a catalog entry, the Python counterpart of #6303 (JS) and #6304 (Go).

The entry declares multiturn, media, system_role and json_mode/text, with tools=False. The live run in #6303 against /v1/chat/completions 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'.

none is itself rejected, so no value lets tools through. Python core does not enforce supports.tools, so the flag is advisory. Listing json_mode is wire-neutral: unlisted ids already send json_object and strict json_schema. Both verified live on astra, along with text, streaming, image input, system role and multiturn.

Tests pin the entry, registration via init() and resolve(), json_object selection, and the unlisted default. pytest 191 passed; ruff, pyright and ty clean.

Live smoke run from Python. Astra rejects max_tokens (Use 'max_completion_tokens' instead), which OpenAIConfig(max_tokens=...) still sends; pre-existing for every reasoning model, fix pending in a separate change since model.py is in flight. Related: #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 Genkit OpenAI plugin. The model is configured with specific capabilities, notably disabling tool support as Chat Completions rejects function tools for this model. Corresponding unit tests have been added to verify the catalog entry, the registration of the model without tools, and the fallback behavior for unlisted models. There are no review comments to address.

gpt-6-astra was only reachable through dynamic resolution. resolve()
registers any unlisted chat id with Supports(multiturn=True), so once the
model was used the Dev UI hid media input, system role, and JSON output
for it. The listing path advertises system_role and tools=False for every
chat id, so the two dynamic defaults also disagreed.

The entry declares multiturn, media, system_role, and json/text output,
with tools=False. On /v1/chat/completions the model rejects function tools
at every reasoning_effort value with a 400 that points at /v1/responses,
which this plugin does not speak. Python core does not enforce
supports.tools in generate(), so a caller who still passes tools gets the
provider 400 rather than an early error; the flag is advisory for the Dev
UI and model refs.

Listing JSON_MODE keeps the wire behavior an unlisted id already had:
schema-less JSON requests send response_format json_object, and schema
requests send strict json_schema regardless of the catalog. A TEXT-only
entry would have dropped response_format instead.

OpenAIConfig.temperature defaults to None and _openai_create_kwargs drops
None values, so default requests carry no temperature and are not affected
by the model rejecting values other than 1.

Tests pin the catalog entry and its exact supports, that init() and
resolve() both register the model with tools=False, that a schema-less
JSON request to it selects json_object, and that an unlisted id still gets
the multiturn-only default from resolve().
@cabljac
cabljac force-pushed the feat/py-openai-gpt-6-astra branch from 7f3fabb to 18e720f Compare September 9, 2026 07:55
@cabljac
cabljac marked this pull request as ready for review September 9, 2026 11:27
… model tests

It builds an OpenAIModel, not the plugin, so it belongs next to the
unlisted-id case it complements.
@hilariie

hilariie commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Opened #6320 to track an issue I found while testing.

@hilariie
hilariie merged commit 0653dee into main Sep 9, 2026
24 checks passed
@hilariie
hilariie deleted the feat/py-openai-gpt-6-astra branch September 9, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants