mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-11-29 02:17:48 +08:00
* fix(providers): validate provider endpoint inputs and keep the gateway credential
* fix(providers): scope the gateway credential to a gateway endpoint and reuse one endpoint guard
* test(providers): name the gateway endpoint case
* fix(providers): require a plain region for the Vertex Anthropic location
* fix(providers): apply the region rule to the Vertex Anthropic provider in the CLI
* docs(changelog): state the shipped provider endpoint behaviour
* fix(providers): validate a Vertex location only when the endpoint derives from it
A Vertex model whose API URL is a concrete endpoint now keeps working with
any location input, because both SDKs use that URL as given. The location is
validated and normalized only when the request URL is unset, empty, or a
catalog template. This applies to the core google-vertex plugins, the
google-vertex-anthropic plugin, and the CLI resolver through one shared
predicate.
Also: persist and expand a location trimmed and lowercased, read a blank AI
Gateway baseURL as unset so the environment gateway credential is kept, and
move the CLI Vertex auth fetch into the kilocode module with tests for both
host branches.
* chore(providers): annotate the normalized anthropic location assignment
* test(providers): pin the concrete model endpoint case for the CLI resolver
* fix(providers): keep the Vertex token on an mTLS endpoint
The Vertex host guard covered the standard API hosts but not the mTLS
endpoints, so a request to an mTLS host no longer received the Google
Cloud access token. Extend the guard to both mTLS host families.
* fix(providers): resolve the Vertex region from the environment once
One resolver now decides the request region for the Vertex providers: the configured location, then GOOGLE_VERTEX_LOCATION, GOOGLE_CLOUD_LOCATION, VERTEX_LOCATION, then the provider default. A blank entry falls through. The model-time validator, both CLI loaders and the catalog transforms share it, so the value is validated wherever the request endpoint derives from it.
The Cloudflare AI Gateway credential rule is stated on the option, in the package README and on the provider page: an explicit gateway key applies on any host, and the environment names supply it for the gateway host itself.
* chore(llm): annotate the extended gateway option documentation
* chore(llm): keep the option documentation on its original line
* docs(providers): lead into each Cloudflare gateway example
Pins the configured Vertex Anthropic region with a test as well: a config-only location selects the regional endpoint.
* fix(providers): resolve the Vertex Anthropic region and project from config
The google-vertex-anthropic custom loader read only the environment for the
Google Cloud project and region, while the sibling google-vertex loader
already honoured the configured options. A configured project or region was
therefore ignored by the endpoint the loader pinned: with a config region the
request host came from the environment region, and with a config project the
URL carried the environment project.
Take the provider argument, resolve the project with the sibling's precedence
and pass the configured location into resolveVertexLocation. Two regression
tests pin the configured location and project reaching the endpoint.
* docs(providers): note the Vertex Anthropic endpoint precedence in the changeset
* docs(providers): state that a Vertex option takes precedence over the environment
* fix(providers): normalize the Vertex Anthropic region before building the endpoint
* fix(test): balance the kilocode_change markers around the Vertex Anthropic tests
* docs(providers): note the blank location option in the changeset
* Revert "docs(providers): note the blank location option in the changeset"
This reverts commit 7a233a25fc.
* test(providers): cover an empty endpoint option with a concrete model URL
* fix(providers): require a well-formed region label for Vertex endpoints
One rule decides a Vertex region label: it starts with a letter, ends with a letter or digit, and never repeats a hyphen. The same rule backs the Vertex API host check, so a region that would build an unusable host is reported as a configuration error at model use.
* fix(providers): build the Vertex Anthropic endpoint from the validated region
The Vertex Anthropic loader no longer decides the request endpoint. It is built at model use, after the region is validated and normalized, so an unusable region is reported as a configuration error and the multi-region rule exists once.
* docs(providers): describe the accepted region form
State the accepted region form in the rule comment.
* fix(providers): treat a blank endpoint option as unset and explain the gateway credential source
A whitespace-only endpoint option falls back to the derived endpoint for the Cloudflare gateway and Workers AI. The missing-credential message names where the gateway credential comes from for the request host. A whitespace-only Azure resource name counts as unset.
* fix(providers): treat a blank Azure resource name as unset on the CLI path
The catalog transform and the Azure plugin already treat a blank or whitespace-only
resource name as unset. The CLI endpoint resolver validated the value first, so the
same configuration reported an invalid name instead of taking the absent-name path.
This applies the same rule in the resolver, so both paths agree.
* test(providers): pin the resource name the resolver leaves untouched
* fix(providers): treat a blank endpoint option as unset on every Vertex path
* docs(providers): state that a blank endpoint option counts as unset
* test(providers): cover a blank endpoint option at each Vertex SDK handler
* test(providers): annotate the new Vertex handler cases
* test(providers): keep the Vertex test block markers contiguous
* fix(providers): treat a blank endpoint option as unset on the Azure SDK path
* refactor(providers): share the Azure resource name error text
* docs(providers): note the blank endpoint rule for Azure in the changeset