Commit Graph

2728 Commits

Author SHA1 Message Date
George Weale 3ed99cacd3 fix: Port dropping the full live LlmRequest from the base_llm_flow log to v1
Starting a live session wrote the entire LlmRequest into the debug log. That
object holds the whole user conversation and config.http_options.headers, which
is where a caller puts an Authorization token, so both ended up in the
google_adk log at DEBUG level.

Now the line logs the agent name, the model, the number of contents and the
response modalities. The request itself is no longer interpolated.

The regression test injects its sentinel credential through
LlmAgent.generate_content_config, which the basic request processor deep-copies
onto llm_request.config, and asserts the header did reach the request the flow
connected with while staying out of the log.

Behaviour change: debug-level output only. The replacement line keeps the
fields anyone was realistically reading.
2026-08-18 17:17:03 +00:00
George Weale d82cd795dd fix: Port omitting HTTP options from Gemini debug logs to v1
At DEBUG level the Gemini model wrote the request config to the log with only
the system instruction and tools excluded, and on the live path it wrote the
whole LlmRequest and the whole LiveConnectConfig. Credentials a caller put in
GenerateContentConfig.http_options or LiveConnectConfig.http_options, most
often an Authorization header, landed in the google_adk log on both paths.

Now http_options is excluded from the request log and from the repr() used
when the dump fails, and the live path logs the model, the content count and
the response modalities instead of the whole request, with the live connect
config copied without its http_options.

Behaviour change: someone debugging at DEBUG level no longer gets the full
llm_request dump on the live path. The headers are still sent to the model API
and to the live API; only the log omits them.
2026-08-17 23:06:28 +00:00
George Weale dadeea18fb fix(telemetry): Port inline binary data summarization on spans to v1
Serializing a content part in JSON mode base64-encodes its inline_data, so the
model response span and the trace_send_data span carried the bytes themselves.
A live session's audio chunks and any image or document a user uploaded were
copied wholesale onto an exported span attribute, which sent the payload to the
trace backend and grew the span with it.

Now a new private helper replaces every part that has inline_data with a text
part reading "<inline_data: {mime}, {n} bytes>", and both call sites route
their content through it. The request side already dropped inline parts and is
unchanged.

Behaviour change: anyone who was reading audio or image bytes back out of a
span now gets that description string instead. The model still receives the
real bytes; only the span is summarized.
2026-08-17 23:04:51 +00:00
George Weale 8c1ae1459d fix: Port http_options exclusion from traced request config to v1
The traced request config was serialized with only response_schema excluded, so
everything a caller put in GenerateContentConfig.http_options was exported to
the tracing backend as a span attribute on every model call. That includes
headers, which commonly carries an Authorization bearer token, and extra_body,
client_args and async_client_args, which are free-form passthroughs callers use
for auth material. Separately, a live httpx or aiohttp client passed through the
same field made the serialization raise PydanticSerializationError, because
those are transport objects pydantic cannot serialize.

Now those seven http_options sub-fields are excluded from the dump. base_url
and the rest of http_options are still traced, and the headers are still sent
to the model API unchanged; only the span omits them.

This combines two upstream fixes that edit the same expression, one excluding
the live client objects and one excluding the credential-bearing fields. The
intermediate state has no value on its own, so it is written here in its final
form.

Behaviour change: anyone reading traces loses the headers, extra_body,
client_args and async_client_args sub-fields of http_options from the
gcp.vertex.agent.llm_request attribute.
2026-08-17 23:03:18 +00:00
George Weale c0f490546e fix: Port credential redaction in AuthCredential repr and error messages to v1
Calling repr() or str() on a credential model, interpolating one into an
f-string, or letting pydantic reject a malformed value rendered the secret in
full: the API key, password, bearer token, OAuth access, refresh and id tokens,
the PKCE verifier, and the service-account private key. Two tools made that
worse by interpolating a whole credential into a message a caller sees, one in
an McpTool ValueError and one in RestApiTool.__repr__.

Now the secret fields are marked repr=False, so only the field names are
rendered. The credential base model sets hide_input_in_errors, so a
ValidationError reports the field name and the error type without echoing the
rejected value. Extra keys, which extra="allow" lets a caller attach and which
pydantic renders unconditionally, have their values replaced by a placeholder.
The McpTool error message and the RestApiTool repr no longer mention the
credential at all.

Behaviour change: anyone who debugs by printing a credential object now sees
the field name with no value. model_dump() and model_dump_json() are untouched,
so the credential services keep round-tripping secrets correctly.
2026-08-17 23:01:56 +00:00
adk-bot c71ade0c96 chore: merge release v1.39.0 to v1 (#6776)
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
2026-08-17 12:27:18 -07:00
Liang Wu 090869b9ba feat(live): use RunConfig.session_resumption.handle when opening a live session (#6770) 2026-08-17 12:20:42 -07:00
Liang Wu 5fb5ff11ce fix(live): stop background tool tasks when a live agent run ends (#6769) 2026-08-17 12:05:53 -07:00
Jason Zhang e7dba7a464 fix: validate session initialization events (v1) (#6771)
Co-authored-by: Petr Marinec <54589756+petrmarinec@users.noreply.github.com>
2026-08-17 11:59:54 -07:00
Liang Wu 5e3b997f93 feat: support audio_stream_end for realtime input (#6699)
Co-authored-by: lottielin <77655652+lottielin@users.noreply.github.com>
2026-08-12 13:11:15 -07:00
adk-bot 3d737f175c chore: merge release v1.38.0 to v1
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
2026-08-07 16:41:29 -07:00
Liang Wu 99c1aa325e feat(live): forward safety_settings from generate_content_config to the Live API (#6641) 2026-08-07 15:12:16 -07:00
Liang Wu 302885bda3 fix(live): transfer to the target agent regardless of function response order (#6608) 2026-08-05 19:06:43 -07:00
Liang Wu f25bb90055 fix(deps): exclude nltk 3.10.1, which breaks venvs living inside the working directory (v1) (#6607) 2026-08-05 18:05:35 -07:00
Kathy Wu 47833640c7 fix: Port tool confirmation security and re-validation fixes to v1 (#6575)
Co-authored-by: Xuan Yang <xygoogle@google.com>
2026-08-05 11:53:50 -07:00
sasha-gitg c680728401 fix: avoid shell execution in ReadFileTool ranged reads and keep local environment file access in workspace (#6597) 2026-08-05 11:50:19 -04:00
nikkie 4555273b5b fix(eval): handle failed inference results without invocations (cherry-pick) (#6565)
Co-authored-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>
Co-authored-by: Liang Wu <18244712+wuliang229@users.noreply.github.com>
2026-08-04 12:10:52 -07:00
Liang Wu 6e59273976 chore: Update FastAPI and Starlette dependencies to fix CVEs (#6573) 2026-08-04 11:26:31 -07:00
adk-bot 8b2feb52ea chore: merge release v1.37.0 to v1 (#6525)
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
2026-07-30 11:11:40 -07:00
Liang Wu c299420531 feat(live): Support asynchronous non-blocking tools (#6522) 2026-07-30 09:48:24 -07:00
adk-bot b251dbfe52 chore: merge release v1.36.2 to v1 (#6440)
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
v1.36.2
2026-07-21 14:39:20 -07:00
Liang Wu 4ef72fef0e fix: Update custom gemini llm connection logic to be used for all 3_x models, not just 3.1 (#6438) 2026-07-21 14:25:05 -07:00
adk-bot 4c23c0fb74 chore: merge release v1.36.1 to v1 (#6320)
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
2026-07-07 14:51:08 -07:00
Kathy Wu e495609c1d chore(release): backport unified release workflows from main (#6318) 2026-07-06 11:56:18 -07:00
Kathy Wu 4caf782af7 fix: Fix Vertex AI Live API session replay on reconnect / modality switch (#6218) 2026-07-06 10:35:59 -07:00
Kathy Wu de2abdf333 fix: exit connection cleanly on expected GoAway signal in bidi streaming (v1) (#6264) 2026-07-06 10:29:05 -07:00
adk-bot e72bf9b976 chore: merge release v1.36.0 to v1 (#6193)
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
v1.36.0
2026-06-22 16:58:46 -07:00
Shangjie Chen 93ca9fe596 chore: consolidate GitHub Actions workflows for v1 branch (#6194) 2026-06-22 16:58:07 -07:00
Kathy Wu 7a9152a382 feat(interactions): support for GenAI SDK upgraded to 2.9+ (#6191) 2026-06-22 16:02:35 -07:00
adk-bot 4f3f350aa8 chore: merge release v1.35.2 to v1 (#6153)
Co-authored-by: adk-bot <223368873+adk-bot@users.noreply.github.com>
v1.35.2
2026-06-17 13:54:06 -07:00
Liang Wu afe408376a fix: remove live event buffering in runner (#6151) 2026-06-17 13:23:28 -07:00
wukath b4fee1cf4d chore(release/v1-candidate): release 1.35.1
Change-Id: I01547579333c8fd0658c375732c635e0b58117c9
v1.35.1
2026-06-15 13:44:02 -07:00
adk-bot 28dbdfb805 chore(release/v1-candidate): release 1.35.0 v1.35.0 2026-06-15 13:13:44 -07:00
Kathy Wu 847a259cd8 fix: Only send grounding_metadata for 3.1 live at the end of each turn (#6129) 2026-06-15 13:04:45 -07:00
Xuan Yang 6e59c61104 fix(streaming): Ensure final partial=False frame is always yielded (#6096) 2026-06-15 10:13:22 -07:00
Liang Wu ecfdaf5f5e feat(live): Handle input transcription differently for Gemini Live 3.1 models (#6045) 2026-06-09 21:35:33 -07:00
Kathy Wu 87abf230db fix(flows): Reset reconnect attempts on connection success (#6042) 2026-06-09 17:28:26 -07:00
Kathy Wu fafafb38e1 fix(models): Default grounding metadata for Gemini 3.1 live (#6018) 2026-06-08 16:19:04 -07:00
Kathy Wu aafd97f6f0 fix: Support generalized history config injection for Gemini 3.1 Live on Vertex AI (#5999) 2026-06-08 10:42:07 -07:00
wukath 15eb38701c fix release finalize 2026-06-02 16:00:31 -07:00
Kathy Wu 6d027b4ce8 fix: add missing Gemini imports in base_llm_flow (#5943) 2026-06-02 15:23:23 -07:00
wukath 19a87caae7 ci: enable precommit workflow for v1 branch 2026-06-02 11:56:26 -07:00
wukath fbe372ed27 ci: enable python unit tests workflow for v1 branch 2026-06-02 11:54:04 -07:00
Wei (Jack) Sun 597a39a669 chore: merge release v1.34.2 to v1 (#5936)
Co-authored-by: Yifan <wanyif@google.com>
Co-authored-by: Jacksunwei <1281348+Jacksunwei@users.noreply.github.com>
2026-06-01 16:20:10 -07:00
Kathy Wu 459782f479 Cherry pick fixes to v1 (#5934)
Co-authored-by: asobran <asobran@google.com>
2026-06-01 15:59:34 -07:00
Yifan 7c0e186186 Update 1.34.1 (#5933) 2026-06-01 15:29:27 -07:00
Yifan ebfff9e52b Revert "Cherry pick fixes to v1" (#5932) 2026-06-01 15:26:06 -07:00
Kathy Wu 8e9d2df46e Cherry pick fixes to v1 (#5900) 2026-05-29 16:36:05 -07:00
asobran b0d419411f ci(releases): Scope changelog strictly to v1 bug fixes
Set last-release-sha to the commit immediately prior to v1 cherry-picks (e13ada75) to prevent Release Please from scanning upstream main history and incorrectly generating minor releases rather than patch releases.

Change-Id: Ic78faa3c558b0cab1670246310c734a2e1616cc4
2026-05-22 18:36:28 +00:00
asobran 8257bf8bfc ci(releases): Use semantic versioning strategy for v1 bug fixes
Configure release-please-config-v1.json with default versioning strategy so that bug fixes correctly trigger patch releases (e.g., 1.34.1) rather than minor releases.

Change-Id: I79efe1743968c6228a470a7a84ba11bcc5b82995
2026-05-22 18:31:25 +00:00