Repository navigation
chore(deps): update go samples (major) - #2870
renovate-bot wants to merge 1 commit into
Conversation
|
/gcbrun |
There was a problem hiding this comment.
Code Review
This pull request updates the Go version to 1.25.0 and upgrades several dependencies across the documentation's Go examples, including a major version bump for google.golang.org/adk to v1.0.0. A critical issue was identified where this upgrade introduces breaking API changes—specifically to the runner.Run function—that will cause existing example code to fail compilation. Feedback was provided to update the affected logic to use the new iterator-based API.
| require ( | ||
| github.com/googleapis/mcp-toolbox-sdk-go v0.5.1 | ||
| google.golang.org/adk v0.3.0 | ||
| google.golang.org/adk v1.0.0 |
There was a problem hiding this comment.
This major version upgrade of google.golang.org/adk to v1.0.0 introduces breaking API changes that will cause the example in agent.go to fail to compile.
The runner.Run function now returns a Go iterator that yields both an event and an error, and the structure of the agent.Event has changed. The example in docs/en/documentation/configuration/pre-post-processing/go/adk/agent.go needs to be updated to use the new API.
Please replace lines 143-154 in agent.go with the following corrected implementation:
fmt.Print("AI: ")
for event, err := range r.Run(ctx, userID, sess.ID(), userMsg, agent.RunConfig{
StreamingMode: streamingMode,
}) {
if err != nil {
fmt.Printf("\nAGENT_ERROR: %v\n", err)
continue
}
if event != nil && event.LLMResponse != nil && event.LLMResponse.Content != nil {
for _, p := range event.LLMResponse.Content.Parts {
if streamingMode != agent.StreamingModeSSE || event.LLMResponse.Partial {
fmt.Print(p.Text)
}
}
}
}Since agent.go is not part of this pull request's changes, I'm adding this comment here. Please apply the fix to agent.go to resolve the compilation error.
3df25cd to
9471e1e
Compare
ℹ️ Artifact update noticeFile name: docs/en/documentation/configuration/pre-post-processing/go/adk/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
File name: docs/en/documentation/getting-started/quickstart/go/adkgo/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
File name: docs/en/documentation/getting-started/quickstart/go/genAI/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
File name: docs/en/documentation/getting-started/quickstart/go/genkit/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
File name: docs/en/documentation/getting-started/quickstart/go/langchain/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
File name: docs/en/documentation/getting-started/quickstart/go/openAI/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Due to Go's usage of Minimal Version Selection (MVS), these packages have been updated to the minimum version available, so will still abide by Details:
|
|
/gcbrun |
9471e1e to
e1aa0d5
Compare
|
/gcbrun |
e1aa0d5 to
dd76fcd
Compare
|
/gcbrun |
dd76fcd to
16d9f8c
Compare
|
/gcbrun |
16d9f8c to
ed00a46
Compare
|
/gcbrun |
ed00a46 to
623628d
Compare
|
/gcbrun |
623628d to
af8ef0b
Compare
|
/gcbrun |
af8ef0b to
a356ffc
Compare
|
/gcbrun |
a356ffc to
c165f10
Compare
|
/gcbrun |
c165f10 to
5e55354
Compare
|
/gcbrun |
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
v0.6.2→v1.2.0v0.6.0→v1.3.0v0.3.0→v2.7.1Release Notes
googleapis/mcp-toolbox-sdk-go (github.com/googleapis/mcp-toolbox-sdk-go/core)
v1.2.0: core: v1.2.0Features
Bug Fixes
v1.1.0: tbadk: v1.1.0Features
v1.0.0: core: v1.0.0Bug Fixes
Documentation
Documentation migrated to the MCP Toolbox official docsite (#201) (7dac748)
v0.7.0: core: v0.7.0⚠ BREAKING CHANGES
Features
google/adk-go (google.golang.org/adk)
v2.7.1Compare Source
Bug Fixes
v2.7.0Compare Source
Highlights
v2.7.0 adds Anthropic Claude as a first-party model, search-gated tool discovery for large tool catalogs, an experimental classifier API for workflow routing, and a per-invocation budget on model calls. It also switches telemetry to the OpenTelemetry GenAI semantic conventions by default, which is a breaking change for anyone consuming ADK traces.
model/anthropicmodelimplementsmodel.LLMover the Anthropic Messages API and Vertex AI, with streaming, tool calling, image and PDF input, extended and adaptive thinking, structured output and prompt caching. Seeexamples/anthropic. (#1866)tool/toolsearchwraps anytool.Toolsetso the model starts with asearch_toolstool plus a configured core set, and the tools it finds are declared from the next model step on. This keeps a large MCP catalog out of every request. Seeexamples/toolsearch. (#1734, #1735)exp/classifierdefines aClassifierthat answers typed Choice, Binary and Score questions with probabilities. It ships with a client for TypeSafe's Jev decision models (exp/classifier/typesafe), anLLMClassifierbacked by anymodel.LLM, and a workflowNodethat routes on the answer, matching adk-python'sClassifierNode. (#2003, #2005, #2035)RunConfig.MaxLLMCallsbounds the model calls one invocation may make, 500 by default, and ends the run withagent.ErrLLMCallsLimitExceededwhen the budget is spent. Matches adk-python'smax_llm_calls. This changes behavior for existing users, see below. (#1412)InlineDataandFileDataparts are sent on both the Responses and Chat Completions endpoints (#1543). A response schema title that is not a valid format name falls back toadk_responseinstead of a 400 from the API (#1912). AGenerateContentConfigfield that a newer genai adds is refused withErrUnsupportedConfigFieldinstead of being dropped silently (#1922).geminitool.GoogleMaps,geminitool.UrlContextandgeminitool.EnterpriseWebSearch. (#2026)Config.Authset, each user gets their own MCP session, so servers that bind a session to the user who opened it stop answering other users with 403 (#1755). MCP HTTP requests identify ADK inUser-AgentandX-Goog-Api-Client, as model calls already do (#1862).auth.ADC()andauth.ServiceAccount()failed every token mint withcontext canceledon local gcloud ADC and impersonated service accounts. Services on GCE or with a key file were not affected. (#1904)tool/toolauthadds adk-python's auth data model and wire format foradk_request_credential, so requests, replies and credential keys agree with adk-python and ADK Web. Nothing uses it yet. (#2032)LoopAgentstops on context cancellation.WithAgentTimeoutandWithAgentCancelwork on tool and callback contexts instead of returning nil. (#1810, #1604)ArtifactDelta.OutputKeyis saved when a before-agent callback short-circuits. (#1878, #1800, #1963){key?}and{artifact.name?}surface infrastructure errors instead of rendering an empty string. This changes behavior, see below. (#1748)agenttoolkeeps code-execution output in sub-agent results. Running an agent withoutRunreturns an error instead of doing nothing. (#1961, #1860, #1850)launcher.Config.TelemetryOptionshonorsWithOtelToCloud. Live reconnect matches close code 1008 by type, not by error text. (#1968, #1993)adkgo deploy agentengine --mem_deployno longer defaults Memory Bank to gemini-2.5-flash, which Vertex AI stopped serving to new projects. Memory Bank applies its own default model unless--mem_modelis set. (#1902)plugin/agentanalytics, its own module and tag): aligned with adk-python's schema and event vocabulary, with rich session, HITL, A2A and workflow events, GCS offloading of multimodal content, opt-in exactly-once delivery, drop statistics, hierarchical span ids with latency and time-to-first-token, and 25 pre-built per-event BigQuery views. (#1786, #1787, #1788, #1789, #1790, #1791 and follow-up fixes)Breaking changes
gen_ai.client.inference.operation.detailsevent per model call, message content on spans is a structured value rather than a JSON string,execute_toolrecords arguments and results only when span content capture is on (undergen_ai.tool.call.*), and an LLM-agent root gets a newinvoke_workflowparent span. SetADK_TELEMETRY_SCHEMA_VERSION_OPT_IN=otel_semconv_1_36to restore the previous format, supported until at least March 31, 2027. (#1635)agent.ErrLLMCallsLimitExceeded. Raise the cap withRunConfig.MaxLLMCallsorADK_MAX_LLM_CALLS, or setMaxLLMCallsto-1for no limit. Unlike adk-python,0means the default, not unlimited. (#1412){key?}and{artifact.name?}render empty only when the key or artifact is missing (session.ErrStateKeyNotExist,fs.ErrNotExist). Any other error from the session or artifact service now fails the run. A customartifact.Servicemust wrapfs.ErrNotExistfor missing files, and anagenttoolsub-agent with an optional artifact placeholder now errors when the root runner has no artifact service. (#1748)go.modmoves from 1.26.6 to 1.26.10. (#1916)agent_eventsinstead ofevents, existing tables are upgraded additively on startup unlessDisableSchemaUpgradeis set, the per-event views are created on startup unlessDisableCreateViewsis set, and granular event types (STATE_DELTA,AGENT_TRANSFER,HITL_*,NODE_OUTPUT, …) replace the genericEVENTrow. These apply when the plugin module is next tagged, not to the corev2.7.0tag. (#1786, #1788, #1791)Smaller behavior changes:
geminitool.GoogleSearchreturns an error on a non-Gemini model, and on a Gemini 1.x model combined with other tools. (#2026)launcher: passingtelemetry.WithOtelToCloud(true)inTelemetryOptionsnow exports to Google Cloud and needs credentials at startup, where it used to start with export silently off. (#1968)openaimodel: a config field added by a genai release newer than v1.74.0 is refused withErrUnsupportedConfigField. Configs valid today are unaffected. (#1922)mcptoolsetwithConfig.Authopens one session per distinct credential, closes sessions idle for 10 minutes, and caps the pool at 64. WithoutAuthnothing changes. (#1755)LoopAgentyields the context error once and stops when its context is cancelled, where it used to keep looping if no pass yielded an event. (#1810)ArtifactDelta, where it yielded none. (#1878)artifact.SaveRequest.Version.Savehas never read it. (#1985)All changes
What's Changed
New Contributors
Full Changelog: google/adk-go@v2.6.0...v2.7.0
New Contributors
v2.6.0Compare Source
Highlights (released Oct 13)
What's Changed
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.