Skip to content

fix: reject json response mime with function calling#5749

Open
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/reject-json-mime-function-calling
Open

fix: reject json response mime with function calling#5749
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/reject-json-mime-function-calling

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • reject response_mime_type="application/json" when an agent has tools and function calling is enabled
  • keep the reported working path (function_calling_config.mode="NONE") allowed
  • add regression coverage for AUTO, ANY, implicit function calling, and NONE

Fixes #5735.

Validation

  • .\.venv\Scripts\python.exe -m pytest tests\unittests\agents\test_llm_agent_fields.py -q -k "json_response_with_function_calling or validate_generate_content_config"
  • .\.venv\Scripts\python.exe -m pytest tests\unittests\flows\llm_flows\test_basic_processor.py tests\unittests\flows\llm_flows\test_output_schema_processor.py -q
  • .\.venv\Scripts\pyink.exe --check src\google\adk\agents\llm_agent.py tests\unittests\agents\test_llm_agent_fields.py
  • git diff --check

Note: direct single-file mypy src/google/adk/agents/llm_agent.py still reports existing strict typing issues elsewhere in that file, outside this change.

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.

responseMimeType.application/json is incompatible with function-calling modes in ADK agent config

1 participant