WebConfig
Category: Web
Source: web_config.dart
Enums
WebSearchProviderType
Provider selector enum for search routing.
Uses Type suffix to avoid colliding with the runtime WebSearchProvider interface.
| Value | Description |
|---|---|
brave | |
tavily | |
firecrawl | |
duckduckgo |
OcrProviderType
Supported OCR providers for scanned PDF fallback.
| Value | Description |
|---|---|
mistral | |
openai |
Classes
WebFetchConfig
Constructor
dart
const WebFetchConfig({
this.timeoutSeconds = AppConstants.webFetchTimeoutSeconds,
this.maxBytes = AppConstants.webFetchMaxBytes,
this.defaultMaxTokens = AppConstants.webFetchDefaultMaxTokens,
this.jinaApiKey,
this.jinaBaseUrl = 'https://r.jina.ai',
this.allowJinaFallback = true,
})Properties
| Property | Type | Description |
|---|---|---|
timeoutSeconds | int | |
maxBytes | int | |
defaultMaxTokens | int | |
jinaApiKey | String? | |
jinaBaseUrl | String | |
allowJinaFallback | bool |
WebSearchConfig
Constructor
dart
const WebSearchConfig({
this.provider,
this.timeoutSeconds = AppConstants.webSearchTimeoutSeconds,
this.defaultMaxResults = AppConstants.webSearchDefaultMaxResults,
this.braveApiKey,
this.tavilyApiKey,
this.firecrawlApiKey,
this.firecrawlBaseUrl,
})Properties
| Property | Type | Description |
|---|---|---|
provider | WebSearchProviderType? | |
timeoutSeconds | int | |
defaultMaxResults | int | |
braveApiKey | String? | |
tavilyApiKey | String? | |
firecrawlApiKey | String? | |
firecrawlBaseUrl | String? | |
resolvedProvider | WebSearchProviderType? get | Auto-detect provider from available API keys. Priority: brave → tavily → firecrawl. |
PdfConfig
Configuration for PDF text extraction.
Constructor
dart
const PdfConfig({
this.maxBytes = AppConstants.pdfMaxBytes,
this.timeoutSeconds = AppConstants.pdfTimeoutSeconds,
this.enableOcrFallback = true,
this.ocrProvider = OcrProviderType.mistral,
this.mistralApiKey,
this.mistralModel = 'mistral-ocr-small',
this.openaiApiKey,
this.openaiModel = 'gpt-4.1-mini',
})Properties
| Property | Type | Description |
|---|---|---|
maxBytes | int | |
timeoutSeconds | int | |
enableOcrFallback | bool | |
ocrProvider | OcrProviderType | |
mistralApiKey | String? | |
mistralModel | String | |
openaiApiKey | String? | |
openaiModel | String | |
hasOcrCredentials | bool get | Whether OCR is available (has at least one API key configured). |
WebConfig
Constructor
dart
const WebConfig({
this.fetch = const WebFetchConfig(),
this.search = const WebSearchConfig(),
this.pdf = const PdfConfig(),
this.browser = const BrowserConfig(),
})Properties
| Property | Type | Description |
|---|---|---|
fetch | WebFetchConfig | |
search | WebSearchConfig | |
pdf | PdfConfig | |
browser | BrowserConfig |