Uses the Gemini-compatible REST format (aiplatform.googleapis.com) with OAuth2 bearer-token authentication via Application Default Credentials (ADC).
Prefer VertexAIConfig.fromValues, which validates the values and resolves contextWindow and reserveCompletion from the bundled model catalogue. The constructor is private: build one with the companion apply and adjust it with the with* setters. Java and Kotlin, which cannot see Scala default arguments, use VertexAIConfig.apply(projectId, model) and the setters, so adding a field never breaks them.
Value parameters
contextWindow
Maximum token capacity for prompt + completion combined.
credentialFilePath
Optional path to a Google JSON credential file. Falls back to GOOGLE_APPLICATION_CREDENTIALS env, then gcloud's application_default_credentials.json ($CLOUDSDK_CONFIG if set; else %APPDATA%\gcloud on Windows; else ~/.config/gcloud), then the GCE metadata server.
location
GCP region, e.g. "us-central1".
model
Model identifier, e.g. "gemini-2.0-flash".
projectId
GCP project ID that owns the Vertex AI resources.
reserveCompletion
Tokens reserved for the completion response.
timeouts
how long a request and a stream may take: the section's timeouts block. An absent value keeps the client's own default (ProviderTimeouts)
wellKnownCredentialPath
where gcloud's well-known application_default_credentials.json would be, resolved at the configuration edge by org.llm4s.config.VertexAIAdcConfigLoader (the descriptor sets it when it builds the client). None skips that lookup.
The endpoint this config will contact, when it is known statically.
The endpoint this config will contact, when it is known statically.
Used by policy checks and diagnostics that need to know where traffic will go without knowing which provider it belongs to. None means the config carries no single URL — not that it makes no network calls.
The same config with the given proxy and TLS settings.
The same config with the given proxy and TLS settings.
The loader calls this on every config a descriptor builds, as it does withTimeouts, so a descriptor does not read the http block itself. The default returns this: a config that does not carry the setting ignores it. A config that does overrides this with its own return type.
The loader calls this on every config a descriptor builds, passing the section's timeouts block, so a descriptor does not read the block itself. The default returns this: a config that does not carry timeouts, such as one supplied by another module, ignores them. A config that does overrides this with its own return type.