personal memory agent
0

Configure Feed

Select the types of activity you want to include in your feed.

test(integration): hold genai client across parity cases (req_bfbdbux6 Lode 1)

The parametrized schema-provider-parity test built a per-call inline
genai.Client(...).models... temporary that was closed before the request
completed ('Cannot send a request, as the client has been closed'), failing
all 13 google cases spuriously. Cache the client per api_key. Test-only;
no product code, schema, or fallback change. Re-verified 39/39 native
(13 Class-A x Google/OpenAI-strict/Anthropic-strict, raw SDK, no fallback).
make ci green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+12 -1
+12 -1
tests/integration/test_schema_provider_parity.py
··· 170 170 return response.output_text or "" 171 171 172 172 173 + _GOOGLE_CLIENTS: dict[str, Any] = {} 174 + 175 + 173 176 def call_google(schema: dict[str, Any], prompt: str, api_key: str) -> str: 174 177 from google import genai 175 178 from google.genai import types 176 179 177 - response = genai.Client(api_key=api_key, vertexai=False).models.generate_content( 180 + # Hold the client across parametrized cases. A per-call inline 181 + # ``genai.Client(...).models...`` temporary is closed before the request 182 + # completes ("Cannot send a request, as the client has been closed"). 183 + client = _GOOGLE_CLIENTS.get(api_key) 184 + if client is None: 185 + client = genai.Client(api_key=api_key, vertexai=False) 186 + _GOOGLE_CLIENTS[api_key] = client 187 + 188 + response = client.models.generate_content( 178 189 model=GEMINI_FLASH, 179 190 contents=[prompt + " Respond JSON only."], 180 191 config=types.GenerateContentConfig(