Repository navigation
fix(py): prefix listed plugin action keys, hydrate unannotated model requests, and add OutputConfig.schema - #87
Merged
Conversation
huangjeff5
force-pushed
the
fix/py-1.0-pr6b-middleware-instances-resilience
branch
from
November 11, 2026 06:22
47719f5 to
be59650
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr6c-plugin-abi-output-schema
branch
from
November 11, 2026 06:22
ae5ca93 to
53054a5
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr6b-middleware-instances-resilience
branch
from
November 11, 2026 16:21
be59650 to
3a3b6df
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr6c-plugin-abi-output-schema
branch
from
November 11, 2026 16:21
53054a5 to
263f69e
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr6b-middleware-instances-resilience
branch
from
November 11, 2026 17:31
3a3b6df to
9bd4843
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr6c-plugin-abi-output-schema
branch
from
November 11, 2026 17:31
263f69e to
f4a7b55
Compare
Registry.list_actions() advertised /model/org/name for a plugin returning an unprefixed slash id, which 404s on /api/runAction. Apply the same prefix rule as init().
…chemas - Model wraps an unannotated request parameter as ModelRequest, like Embedder, so Dev UI / CLI runs pass a ModelRequest, not a dict. - DynamicActionProvider stamps itself on its action, so one returned from Plugin.init() is recoverable from the registry. - genkit-openai wraps non-object tool input schemas under 'input' and unwraps tool requests, matching genkit-google-genai.
huangjeff5
changed the base branch from
fix/py-1.0-pr6b-middleware-instances-resilience
to
main
November 11, 2026 18:37
huangjeff5
force-pushed
the
fix/py-1.0-pr6c-plugin-abi-output-schema
branch
from
November 11, 2026 18:38
f4a7b55 to
f07e4b6
Compare
apascal07
reviewed
Nov 11, 2026
apascal07
approved these changes
Nov 11, 2026
…put, type unannotated model config
- genkit-openai: a root $ref is judged by its target, so an Enum input is
wrapped; $defs stay at the wrapper root so refs still resolve
(list[Enum], Optional[Enum]).
- genkit-openai: stream chunks for a wrapped tool carry the bare value,
matching response.message, instead of '{"input": ...}' fragments.
- Model: an unannotated handler with a Pydantic config_schema gets
ModelRequest[Config], so request.config is the config model.
- Drop the now-dead setattr in define_dynamic_action_provider.
This was referenced Nov 15, 2026
Merged
This was referenced Nov 22, 2026
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.
Four plugin-author bugs that made models and tools show up but not run.
meta-llama/Llama-3.3-70B) showed rows in the Dev UI that returned404 Action not foundwhen run.async def my_model(req, ctx: ModelContext)) got a rawdictwhen run from the Dev UI or CLI.request.output.schemareturned Pydantic's deprecatedBaseModel.schemamethod instead of the output schema.genkit-openaisent scalar tool inputs as a non-object schema, which OpenAI rejects.Changes
init()andresolve_actionkey plugin actions as<plugin>/<id>, butlist_actions()advertised a bare ID as-is, so the Dev UI key pointed nowhere.list_actions()now applies the same rule and adds<plugin>/unless the name already starts with it.ModelRequest: a Dev UI or CLI run sends JSON, and with no type hint on the request parameter nothing converted it.Modelnow converts the input toModelRequestfor unannotated handlers, asEmbedderalready does. With a Pydanticconfig_schema, it'sModelRequest[Config], sorequest.configis the config model.DynamicActionProviderreturned frominit()is listed: the provider is now attached to its own action at construction. Adap.actionreturned fromPlugin.init()shows up as a provider in the catalog, not only one registered throughdefine_dynamic_action_provider.OutputConfig.schemareturns the schema: it is now a read-only property returningjson_schema(dict[str, Any] | None). It shadows Pydantic's deprecatedschema()classmethod and matches the wire keyschema.genkit-openaiwraps scalar tool inputs: OpenAI function calling requires"type": "object"at the schema root, so a tool likeasync def current_weather(city: str)failed. Non-object input schemas are now sent as{"type": "object", "properties": {"input": ...}, "required": ["input"]}. A root$ref(Pydantic's shape for an Enum input) is judged by its target, and$defsstay at the wrapper root so refs still resolve. The plugin unwrapsinputbefore calling the tool, sends streamed tool-call chunks with the bare value, and wraps earlier calls when replaying history, asgenkit-google-genaialready does.Breaking changes
None. The old catalog keys for bare IDs couldn't be run, and an OpenAI request with a scalar tool schema was rejected.
OutputConfig.schema()as a Pydantic classmethod was deprecated; useOutputConfig.model_json_schema().Cross-SDK
Reflection
/api/actionskeys for Python plugins that list bare IDs change from/<kind>/<id>to/<kind>/<plugin>/<id>. This is the keyinit()andresolve_actionalready use, and the same format JS and Go use:JS, Go, Dart, and the Dev UI need no changes.