ProviderCapabilities class abstract

Provider capability declaration interface

This interface provides a high-level overview of provider capabilities for documentation, selection, and informational purposes.

Important Notes:

  1. Model Variations: Actual feature support may vary by specific model within the same provider (e.g., GPT-4 vs GPT-3.5, Claude Sonnet vs Haiku)

  2. OpenAI-Compatible Providers: Providers using OpenAI-compatible APIs may have different capabilities than what's declared here, as they're accessed through baseUrl/apiKey configuration

  3. Runtime Detection: Some features (like reasoning output format) are detected at runtime through response parsing rather than capability checks

  4. Informational Purpose: This is primarily for provider selection and documentation, not strict runtime validation

Usage Examples:

// Provider selection based on capabilities
if (provider.supports(LLMCapability.vision)) {
  // This provider generally supports vision
}

// But always handle runtime variations gracefully
final response = await provider.chat(messagesWithImage);
if (response.text != null) {
  // Process response regardless of capability declaration
}
Implementers

Constructors

ProviderCapabilities.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedCapabilities Set<LLMCapability>
Set of capabilities this provider supports
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
supports(LLMCapability capability) bool
Check if this provider supports a specific capability
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited