/** * Groq Provider * Implementation for Groq fast inference models (OpenAI-compatible API) */ import type { LLMRequest, LLMResponse, GroqConfig, ModelCapabilities, ProviderBalance } from '../types.js'; import { BaseProvider } from './base.js'; export declare class GroqProvider extends BaseProvider { name: string; models: string[]; supportsStreaming: boolean; supportsTools: boolean; supportsBatching: boolean; supportsVision: boolean; private apiKey; private baseUrl; constructor(config: GroqConfig); generateResponse(request: LLMRequest): Promise; validateConfig(): boolean; getModels(): string[]; estimateCost(request: LLMRequest): number; healthCheck(): Promise; getProviderBalance(): Promise; protected getModelCapabilities(): Record; /** * Stream response support (OpenAI-compatible SSE format) */ streamResponse(request: LLMRequest): Promise>; private makeGroqRequest; private formatRequest; /** * Gate and serialize built-in tools onto a Groq request. * * Capability is checked against the catalog (`modelSupportsBuiltInTools`) so * the adapter and catalog can't drift. The wire shape then forks by family: * compound systems take the normalized identifiers on * `compound_custom.tools.enabled_tools`; gpt-oss takes OpenAI-style * `{ type }` entries on the shared `tools` array, translated to its native * vocabulary (`web_search` → `browser_search`). */ private applyBuiltInTools; private formatResponse; /** * Map Groq's `message.executed_tools[]` → normalized `BuiltInToolResult[]` * (issue #69, verified live in S0). * * Keeps only executions that carry a non-empty `search_results.results` and * flattens those into `results`, preserving the per-execution `type` / `name` * / `arguments`. Non-search executions (e.g. `code_interpreter`) have no * `search_results` and so drop out by design — that's the locked spec, not a * bug. Citation sub-fields are mapped as-is: any field the provider omits * surfaces as `undefined` (soft degrade) rather than throwing, since the * schema deliberately doesn't guard them (consumers HEAD-probe URLs anyway). */ private extractBuiltInToolResults; private getDefaultModel; } //# sourceMappingURL=groq.d.ts.map