/** * Shared helpers for model providers. * Keep vendor adapters thin: map messages/tools here, call the SDK, return ModelResponse. */ import type { ModelRequest } from "../types"; /** Append JSON-only instruction when the agent expects structured output. */ export declare function buildSystemPrompt(request: ModelRequest): string; /** Parse a JSON object string; return {} on failure (never throws). */ export declare function parseJsonObject(raw: string | undefined | null): unknown; /** * Resolve an API key from config or env. Never log the returned value. * Throws a clear error if missing (safe for callers — message has no secret). */ export declare function requireApiKey(explicit: string | undefined, envKeys: string[], providerLabel: string): string; export declare function errorMessage(err: unknown): string; //# sourceMappingURL=shared.d.ts.map