Repository navigation
Conversation
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 5, 2026
Merge #7920 ApigeeLlm's Chat Completions path now sends `output_schema` (`response_schema`) as a named `json_schema` response format instead of `json_object`, and wraps a raw `response_json_schema` in the required `{"name": ..., "schema": ...}` object. A `response_json_schema` that is already wrapped is sent unchanged. An empty `response_json_schema` (`{}`) now sends a `json_schema` format with an empty schema instead of falling back to `json_object`. Fixes #7864 PiperOrigin-RevId: 1014541065
Collaborator
1828703450qqcom-ux
pushed a commit
to 1828703450qqcom-ux/adk-python
that referenced
this pull request
Nov 5, 2026
Merge google#7920 ApigeeLlm's Chat Completions path now sends `output_schema` (`response_schema`) as a named `json_schema` response format instead of `json_object`, and wraps a raw `response_json_schema` in the required `{"name": ..., "schema": ...}` object. A `response_json_schema` that is already wrapped is sent unchanged. An empty `response_json_schema` (`{}`) now sends a `json_schema` format with an empty schema instead of falling back to `json_object`. Fixes google#7864 PiperOrigin-RevId: 1014541065
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.
Link to Issue or Description of Change
Closes #7864
Problem: On the Apigee Chat Completions path,
output_schemais reduced to JSON object mode, and a rawresponse_json_schemais sent without the required name and schema wrapper.Solution: Convert either schema input to a named JSON schema for the request. Keep already wrapped schemas and JSON-only mode working, and normalize schema types without changing the caller's input.
Testing Plan
Unit Tests:
python -m pytest -p pytest_asyncio.plugin tests/unittests/models/test_completions_http_client.py tests/unittests/models/test_apigee_llm.py tests/unittests/models/test_llm_request.py -q --disable-warnings, withPYTHONPATH=srcand plugin autoload disabled: 207 passed.95d8610ea3445ce9c6d0cf70aed1a0071ddc1e2fin each environment. The full suite therefore did not pass.Manual End-to-End (E2E) Tests:
Used
httpx.MockTransportwithApigeeLlmto inspect the requests and consume mock responses. The validation script covers six configurations with streaming on and off. It reported12 simulated end-to-end requests passed. The same check passed against an installed wheel without the OpenAI SDK. No live model endpoint was used.Checklist
Additional context
PR #7626 separately updates the shared schema conversion helper for a workflow issue; this change does not depend on it.
AI assistance was used to implement and review this change.