Skip to content

fix(models): forward Anthropic generation config#5400

Open
MukundaKatta wants to merge 2 commits intogoogle:mainfrom
MukundaKatta:codex/adk-anthropic-generation-config
Open

fix(models): forward Anthropic generation config#5400
MukundaKatta wants to merge 2 commits intogoogle:mainfrom
MukundaKatta:codex/adk-anthropic-generation-config

Conversation

@MukundaKatta
Copy link
Copy Markdown

@MukundaKatta MukundaKatta commented Apr 19, 2026

Summary

  • forward temperature, top_p, top_k, and stop_sequences from GenerateContentConfig to Anthropic messages.create(...)
  • apply the same forwarding in the streaming path
  • add regression tests for both non-streaming and streaming kwargs

Testing

  • python3 -m py_compile src/google/adk/models/anthropic_llm.py tests/unittests/models/test_anthropic_llm.py
  • python3 -m pytest tests/unittests/models/test_anthropic_llm.py -k "forwards_generation_config_kwargs or finish_reason or non_streaming_does_not_pass_stream_param" (fails during local collection: ModuleNotFoundError: No module named anthropic)

@adk-bot adk-bot added the models [Component] Issues related to model support label Apr 19, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 19, 2026

Response from ADK Triaging Agent

Hello @MukundaKatta, thank you for creating this PR!

This PR seems to be a feature enhancement. Could you please associate a GitHub issue with this PR? If there is no existing issue, could you please create one? This information will help reviewers to review your PR more efficiently. Thanks!

@rohityan rohityan self-assigned this Apr 20, 2026
@rohityan rohityan added the request clarification [Status] The maintainer need clarification or more information from the author label Apr 20, 2026
@rohityan
Copy link
Copy Markdown
Collaborator

Hi @MukundaKatta , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Please fix formatting errors by running autoformat.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models [Component] Issues related to model support request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants