mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
* fix(provider): honor base_url for google-genai and vertexai providers The google-genai and vertexai provider types silently ignored a configured base_url and always hit generativelanguage.googleapis.com (e.g. a Gemini- compatible proxy URL + key could not be used). Plumb the endpoint through to the @google/genai SDK via httpOptions.baseUrl: - kosong: add baseUrl to GoogleGenAIOptions and inject it into the client's httpOptions alongside the existing headers (the SDK merges headers and overrides the base host). - agent-core: forward provider.baseUrl in the google-genai and vertexai branches, with GOOGLE_GEMINI_BASE_URL / GOOGLE_VERTEX_BASE_URL env fallback. vertexai keeps deriving location from an aiplatform host. - docs: document base_url for both providers, noting the host root only must be given because the SDK appends the API version itself. Covered by unit tests asserting the URL reaches the kosong config and the SDK client's httpOptions. * fix(provider): use the effective base_url for vertex location detection The vertexai branch forwarded the endpoint from config `base_url` OR the GOOGLE_VERTEX_BASE_URL env fallback, but service-account detection (`hasVertexAIServiceEnv` / `vertexAILocation`) still derived the region from `provider.baseUrl` only. Supplying the regional endpoint via the env fallback (with a project but no explicit GOOGLE_CLOUD_LOCATION) therefore left location undefined and silently downgraded Vertex ADC to API-key Gemini routing. Resolve the effective base URL once and use it for both forwarding and location derivation, so the env fallback behaves exactly like `base_url`. Add a changeset for the kosong + agent-core patch release. |
||
|---|---|---|
| .. | ||
| .vitepress | ||
| en | ||
| media | ||
| public | ||
| zh | ||
| .gitignore | ||
| AGENTS.md | ||
| index.md | ||
| package.json | ||