Skip to content

Add api_params passthrough for provider-specific parameters#129

Open
mohami2000 wants to merge 4 commits intocifrom
param-inputs
Open

Add api_params passthrough for provider-specific parameters#129
mohami2000 wants to merge 4 commits intocifrom
param-inputs

Conversation

@mohami2000
Copy link
Copy Markdown
Contributor

@mohami2000 mohami2000 commented Apr 10, 2026

Allows advanced users to pass arbitrary provider-specific API parameters (e.g., detail, reasoning_effort, media_resolution, thinking_config) through to OpenAI and GenAI backends without hardcoding each one in the SDK.

  1. Content types (images, videos, audios) accept **kwargs stored as api_params
  2. prompt() accepts **kwargs for request-level params (e.g., reasoning_effort, thinking_config)
  3. GenAI serializer filters api_params to only valid Part fields, silently dropping provider-specific ones like detail

Added tests.

design doc
BUG=b/496208368

@mohami2000 mohami2000 changed the title checkpoint Add api_params passthrough for provider-specific parameters Apr 12, 2026
@Kaggle Kaggle deleted a comment from google-cla bot Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant