pub struct VertexProvider { /* private fields */ }Available on crate feature
vertex only.Expand description
Google Vertex AI LLM provider.
Uses the same Gemini request/response format as GeminiProvider but
authenticates via OAuth2 Bearer tokens and routes through the Vertex AI
regional endpoint.
Claude models are also supported — the provider detects the publisher from the model name and uses the appropriate API format automatically.
Implementations§
Source§impl VertexProvider
impl VertexProvider
Sourcepub fn new(
access_token: String,
project_id: String,
region: String,
model: String,
) -> VertexProvider
pub fn new( access_token: String, project_id: String, region: String, model: String, ) -> VertexProvider
Create a new Vertex AI provider with full control over all parameters.
Sourcepub fn flash(
access_token: String,
project_id: String,
region: String,
) -> VertexProvider
pub fn flash( access_token: String, project_id: String, region: String, ) -> VertexProvider
Create a provider using Gemini 3 Flash Preview on Vertex AI.
Sourcepub fn pro(
access_token: String,
project_id: String,
region: String,
) -> VertexProvider
pub fn pro( access_token: String, project_id: String, region: String, ) -> VertexProvider
Create a provider using Gemini 3.1 Pro Preview on Vertex AI.
Sourcepub const fn with_thinking(self, thinking: ThinkingConfig) -> VertexProvider
pub const fn with_thinking(self, thinking: ThinkingConfig) -> VertexProvider
Set the provider-owned thinking configuration for this model.
Trait Implementations§
Source§impl Clone for VertexProvider
impl Clone for VertexProvider
Source§fn clone(&self) -> VertexProvider
fn clone(&self) -> VertexProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl LlmProvider for VertexProvider
impl LlmProvider for VertexProvider
Source§fn chat<'life0, 'async_trait>(
&'life0 self,
request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatOutcome, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
VertexProvider: 'async_trait,
fn chat<'life0, 'async_trait>(
&'life0 self,
request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatOutcome, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
VertexProvider: 'async_trait,
Non-streaming chat completion.
Source§fn chat_stream(
&self,
request: ChatRequest,
) -> Pin<Box<dyn Stream<Item = Result<StreamDelta, Error>> + Send + '_>>
fn chat_stream( &self, request: ChatRequest, ) -> Pin<Box<dyn Stream<Item = Result<StreamDelta, Error>> + Send + '_>>
Streaming chat completion. Read more
Source§fn validate_thinking_config(
&self,
thinking: Option<&ThinkingConfig>,
) -> Result<(), Error>
fn validate_thinking_config( &self, thinking: Option<&ThinkingConfig>, ) -> Result<(), Error>
Validate a thinking configuration against the provider/model capabilities. Read more
fn model(&self) -> &str
fn provider(&self) -> &'static str
Source§fn configured_thinking(&self) -> Option<&ThinkingConfig>
fn configured_thinking(&self) -> Option<&ThinkingConfig>
Provider-owned thinking configuration, if any.
Source§fn default_max_tokens(&self) -> u32
fn default_max_tokens(&self) -> u32
Default maximum output tokens for this provider/model when the caller
does not explicitly override
AgentConfig.max_tokens.Source§fn capabilities(&self) -> Option<&'static ModelCapabilities>
fn capabilities(&self) -> Option<&'static ModelCapabilities>
Canonical capability metadata for this provider/model, if known.
Source§fn resolve_thinking_config(
&self,
request_thinking: Option<&ThinkingConfig>,
) -> Result<Option<ThinkingConfig>, Error>
fn resolve_thinking_config( &self, request_thinking: Option<&ThinkingConfig>, ) -> Result<Option<ThinkingConfig>, Error>
Resolve the effective thinking configuration for a request. Read more
Source§fn structured_output_support(&self) -> StructuredOutputSupport
fn structured_output_support(&self) -> StructuredOutputSupport
How this provider satisfies a structured-output
(
ResponseFormat) request. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for VertexProvider
impl !UnwindSafe for VertexProvider
impl Freeze for VertexProvider
impl Send for VertexProvider
impl Sync for VertexProvider
impl Unpin for VertexProvider
impl UnsafeUnpin for VertexProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more