Repository navigation
feat(py/plugins/openai): add gpt-6-astra to the OpenAI model catalog - #6306
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
This was referenced Sep 8, 2026
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
force-pushed
the
feat/py-openai-gpt-6-astra
branch
from
September 9, 2026 07:55
7f3fabb to
18e720f
Compare
cabljac
marked this pull request as ready for review
September 9, 2026 11:27
hilariie
approved these changes
Sep 9, 2026
… model tests It builds an OpenAIModel, not the plugin, so it belongs next to the unlisted-id case it complements.
Contributor
|
Opened #6320 to track an issue I found while testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gpt-6-astraonly reaches the Python OpenAI plugin through dynamic resolution, which registers it withSupports(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_roleandjson_mode/text, withtools=False. The live run in #6303 against/v1/chat/completionsreturned:noneis itself rejected, so no value lets tools through. Python core does not enforcesupports.tools, so the flag is advisory. Listingjson_modeis wire-neutral: unlisted ids already sendjson_objectand strictjson_schema. Both verified live on astra, along with text, streaming, image input, system role and multiturn.Tests pin the entry, registration via
init()andresolve(),json_objectselection, and the unlisted default.pytest191 passed; ruff, pyright and ty clean.Live smoke run from Python. Astra rejects
max_tokens(Use 'max_completion_tokens' instead), whichOpenAIConfig(max_tokens=...)still sends; pre-existing for every reasoning model, fix pending in a separate change sincemodel.pyis in flight. Related: #5898.