The doctor contract registry suites called vi.resetModules() plus a dynamic
re-import in beforeEach, so all 54 cases re-evaluated the whole doctor owner
graph: setup policy, migration adapters, config normalization, loader state,
and native/SDK alias resolution. Load once in beforeAll instead and keep the
per-case mock resets, loader injection, cache clearing, and temp-dir cleanup
where they were. setup-registry.test.ts already used this shape.
doctor-contract-registry.test.ts: 29.7s -> 18.2s (-39%), import 508ms -> 136ms.
Also narrow imports that pulled broad graphs in for static work:
seven files reached createEmptyPluginRegistry through registry.js (the whole
registry construction graph) instead of its real owner registry-empty.js;
three provider tests imported api.js, paying for transport streaming,
provider auth, and image-generation SDK graphs to test string normalization;
and provider-utils.test.ts used importActual() to spread a runtime whose only
used export it immediately replaced.
Neither provider barrel suite actually asserted the narrowed exports, so add
explicit re-export assertions in extensions/{google,xai}/api.test.ts rather
than let that coverage lapse.
Unrelated flake fixed in passing: hooks.correlation.test.ts spawns a tsx
subprocess under a 3s deadline, which is killed under load and reports
status null. It failed 3/3 on unmodified code and passes 4/4 at 30s. No
assertion changed.
Test-only change: zero production LOC.
* fix(google): handle empty image generation base URL
* fix(google): preserve attribution for blank base URL
* test(google): cover blank media base URLs
* fix(google): normalize blank Gemini API URLs
---------
Co-authored-by: Ted Li <tl2493@columbia.edu>
Fix live model inference edge cases across provider streaming, model switching, outbound delivery, and gateway tool resolution.
Includes live/provider issue fixes and leaves #89100 explicitly partial for the remaining FM-2 group routing case.
When a configured Google provider/model row had no explicit
but had a baseUrl set, the fallback defaulted to openai-completions,
causing Gemini requests to route through the OpenAI Responses
transport instead of the native @google/genai transport.
Made resolveConfiguredProviderDefaultApi provider-aware: for the
google provider, the default API is now google-generative-ai.
Root cause: the generic fallback assumed any provider with a baseUrl
should use openai-completions, which is incorrect for Google's native
Gemini API.
Co-authored-by: xin <1052326311+xin@users.noreply.github.com>
Normalize Google Gemini 3.1 Flash Lite routing to the GA model id and keep the retired preview spelling as a compatibility alias. Align default alias docs, FAQ guidance, and deprecated-model manifest recommendations with the GA id.
Fixes#86151.
Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>