fix(translator): apply temperature/maxTokens/topP for AzureOpenAI#1972
Open
mesutoezdil wants to merge 1 commit into
Open
fix(translator): apply temperature/maxTokens/topP for AzureOpenAI#1972mesutoezdil wants to merge 1 commit into
mesutoezdil wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Azure OpenAI parameter support to the ADK model translation and introduces new translator golden test fixtures for an Azure-backed agent.
Changes:
- Extend
adk.AzureOpenAIto serializemax_tokens,temperature, andtop_p. - Populate Azure OpenAI temperature/top_p (and max tokens if set) during model translation.
- Add new translator input/output fixtures for an
azure-agentscenario.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| go/core/internal/controller/translator/agent/testdata/outputs/azure_agent.json | New expected translated manifest/config output for an Azure OpenAI agent scenario. |
| go/core/internal/controller/translator/agent/testdata/inputs/azure_agent.yaml | New test input defining ModelConfig + Agent for Azure OpenAI translation. |
| go/core/internal/controller/translator/agent/adk_api_translator.go | Sets Azure OpenAI temperature/top_p and conditionally max_tokens during translation. |
| go/api/adk/types.go | Adds Azure OpenAI JSON fields for max_tokens, temperature, and top_p. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1d9bab7 to
2b8f5d2
Compare
Fields defined in AzureOpenAIConfig were never forwarded to the adk struct. Add them and cover with a unit test. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
2b8f5d2 to
9a0dda5
Compare
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.
AzureOpenAIConfigdefinestemperature,maxTokens, andtopPbut the translator never wrote them to the agent config JSON. Theadk.AzureOpenAIstruct also lacked these fields so they were silently dropped.The Python
AzureOpenAImodel inheritsBaseOpenAIand already reads these params, so the runtime handles them once they appear in the JSON.