import type { Capabilities, Request } from '@wrongstack/core/types'; import type { CompatibilityQuirks } from './compatibility-quirks.js'; import type { BuildBodyContext } from './model-output-limits.js'; import { OpenAIProvider } from './openai.js'; import type { WireAdapterStreamOptions } from './wire-adapter.js'; export type { CompatibilityQuirks } from './compatibility-quirks.js'; export declare function isCompatibilityQuirks(value: unknown): value is CompatibilityQuirks; export interface OpenAICompatibleOptions { id: string; apiKey: string; baseUrl: string; headers?: Record | undefined; quirks?: CompatibilityQuirks | undefined; capabilities?: Partial | undefined; fetchImpl?: typeof fetch | undefined; /** * Optional override for URL construction. Receives the base URL and request, * returns the full URL to use. Allows custom providers with non-standard * URL structures (e.g. Google with model-in-path, Anthropic with /v1/messages). */ urlOverride?: ((baseUrl: string, req: Request) => string) | undefined; /** Raw stream debugging and hang-detection options. */ streamOpts?: WireAdapterStreamOptions | undefined; } export declare class OpenAICompatibleProvider extends OpenAIProvider { private readonly extraHeaders?; private readonly urlOverride?; constructor(opts: OpenAICompatibleOptions); protected buildUrl(req: Request): string; /** * Compatible endpoints (Groq, Together, Mistral, local servers, …) follow the * classic Chat Completions contract and accept `max_tokens`; many reject * OpenAI's newer `max_completion_tokens`. Keep the legacy field here. See #10. */ protected tokenLimitParam(): string; protected buildBody(req: Request, ctx: BuildBodyContext): Record; protected buildHeaders(req: Request): Record; } export { GENERIC_EFFORT_FALLBACK } from './openai-shared.js'; //# sourceMappingURL=openai-compatible.d.ts.map