Skip to main content

OpenCodeGoProvider

Struct OpenCodeGoProvider 

Source
pub struct OpenCodeGoProvider { /* private fields */ }

Implementations§

Source§

impl OpenCodeGoProvider

Source

pub fn new(api_key: String) -> Self

Source

pub fn with_model(api_key: String, model: String) -> Self

Source

pub fn new_with_client( api_key: String, model: String, http_client: Client, base_url: String, _timeouts: TimeoutsConfig, ) -> Self

Source

pub fn from_config( api_key: Option<String>, model: Option<String>, base_url: Option<String>, _prompt_cache: Option<PromptCachingConfig>, timeouts: Option<TimeoutsConfig>, _anthropic: Option<AnthropicConfig>, _model_behavior: Option<ModelConfig>, ) -> Self

Trait Implementations§

Source§

impl LLMClient for OpenCodeGoProvider

Source§

fn generate<'life0, 'life1, 'async_trait>( &'life0 mut self, prompt: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<LLMResponse, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn model_id(&self) -> &str

Source§

impl LLMProvider for OpenCodeGoProvider

Source§

fn name(&self) -> &str

Provider name (e.g., “gemini”, “openai”, “anthropic”)
Source§

fn supports_streaming(&self) -> bool

Whether the provider has native streaming support
Source§

fn supports_non_streaming(&self, _model: &str) -> bool

Whether the provider can service non-streaming generation requests for the model.
Source§

fn supports_reasoning(&self, model: &str) -> bool

Whether the provider surfaces structured reasoning traces for the given model
Source§

fn supports_tools(&self, model: &str) -> bool

Whether the provider supports structured tool calling for the given model
Source§

fn supports_structured_output(&self, model: &str) -> bool

Whether the provider supports structured output (JSON schema guarantees)
Source§

fn supports_context_caching(&self, model: &str) -> bool

Whether the provider supports prompt/context caching
Source§

fn supports_vision(&self, model: &str) -> bool

Whether the provider supports vision (image analysis) for given model
Source§

fn effective_context_size(&self, model: &str) -> usize

Get the effective context window size for a model. Read more
Source§

fn generate<'life0, 'async_trait>( &'life0 self, request: LLMRequest, ) -> Pin<Box<dyn Future<Output = Result<LLMResponse, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Generate completion
Source§

fn stream<'life0, 'async_trait>( &'life0 self, request: LLMRequest, ) -> Pin<Box<dyn Future<Output = Result<LLMStream, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stream completion (optional)
Source§

fn supported_models(&self) -> Vec<String>

Get supported models
Source§

fn validate_request(&self, request: &LLMRequest) -> Result<(), LLMError>

Validate request for this provider
Source§

fn backend_kind(&self) -> BackendKind

The canonical backend kind for this provider. Read more
Source§

fn supports_reasoning_effort(&self, _model: &str) -> bool

Whether the provider accepts configurable reasoning effort for the model
Source§

fn supported_reasoning_efforts(&self, model: &str) -> &'static [&'static str]

Exact levels accepted by this route; providers may override catalog metadata.
Source§

fn sampling_overrides(&self, _model: &str) -> SamplingOverrides

Provider/model-specific sampling parameter overrides. Read more
Source§

fn supports_parallel_tool_config(&self, _model: &str) -> bool

Whether the provider understands parallel tool configuration payloads
Source§

fn supports_responses_compaction(&self, _model: &str) -> bool

Whether the provider supports Responses API server-side compaction.
Source§

fn supports_native_allowed_tools(&self, _model: &str) -> bool

Whether the request path can enforce a provider-native allowed_tools subset.
Source§

fn supports_context_edits(&self, _model: &str) -> bool

Whether the provider supports provider-native context editing such as tool-result clearing.
Source§

fn supports_turn_scoped_system_messages(&self, _model: &str) -> bool

Whether the selected provider/model can carry Anthropic’s native turn-scoped system-message lifecycle field on the wire. Read more
Source§

fn supports_manual_openai_compaction(&self, _model: &str) -> bool

Whether the provider supports the interactive manual /compact command path. Read more
Source§

fn supports_native_inline_compaction(&self, _model: &str) -> bool

Whether the provider supports threshold-triggered inline compaction via request fields (Anthropic compact_20260112). Read more
Source§

fn manual_openai_compaction_unavailable_message(&self, model: &str) -> String

Explain why the --native-only manual /compact path is unavailable. Read more
Source§

fn compact_history<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _model: &'life1 str, _history: &'life2 [Message], ) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Compact conversation history using provider-native Responses /compact support when available.
Source§

fn compact_history_with_options<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _model: &'life1 str, _history: &'life2 [Message], _options: &'life3 ResponsesCompactionOptions, ) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Compact conversation history with standalone Responses compaction options.
Source§

fn stream_normalized<'life0, 'async_trait>( &'life0 self, request: LLMRequest, ) -> Pin<Box<dyn Future<Output = Result<LLMNormalizedStream, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Normalized streaming contract layered on top of the legacy provider stream.
Source§

fn start_copilot_prompt_session<'a>( &'a self, _request: LLMRequest, _tools: &'a [ToolDefinition], ) -> Option<CopilotPromptSessionFuture<'a>>

Provider-specific streaming path that can service interactive runtime requests while the stream is active. Copilot uses this to bridge ACP tool calls and permission prompts back into VT Code’s turn runtime.
Source§

fn get_balance<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<BalanceInfo>, LLMError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch account balance for this provider, if supported.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmCompatSend for T
where T: Send,

Source§

impl<T> WasmCompatSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more