[plugins] Anthropic Python: add typed AnthropicConfig schema as customOptions
Parent: #5617 (Phase A, P0: item 33)
Why
Python advertises a generic ModelConfig as customOptions, so every Anthropic-specific option (thinking modes, output_config.effort, tool_choice, api_version, betas, and metadata) is invisible to reflection, the dev UI, and type hints. Today a caller can only discover these by reading the source, and the values are not validated before they reach the API.
Beyond discoverability, a typed config is the scaffold that the rest of the config-driven parity work hangs off (thinking modes, effort, the stable/beta split). Defining it once, up front, means those fields are typed a single time instead of being re-typed by each later change, which is why the epic sequences it before the thinking request-side work (item 11, #5629 ).
What needs to be done
- Provide a typed Anthropic config that surfaces and validates the Anthropic-specific options:
thinking,output_config(includingeffortandtask_budget),tool_choice,metadata,api_version, andbetas, modelled on the JS config and thinking schemas. - Advertise it as the
customOptionsfor every Anthropic model so the options are discoverable and typed in reflection and the dev UI. - Preserve backward compatibility for callers that currently pass plain-dict configs.
Acceptance
- Anthropic-specific options are discoverable via reflection / dev UI and are typed and validated.
- The typed config is advertised as
customOptionsfor all Anthropic models. - Existing dict-based configs continue to work; tests cover the schema and its validation rules (e.g.
enabledrequires a budget;enabledandadaptiveare mutually exclusive).
Reference
- Current
customOptionswiring:py/plugins/anthropic/src/genkit/plugins/anthropic/plugin.py:126andplugin.py:144. - JS target:
js/plugins/anthropic/src/types.ts:68-159(ThinkingConfigSchema,AnthropicConfigSchema).