import { z } from 'zod'; import type { MultiModelConfig } from '@zhixuan92/multi-model-agent-core'; import type { RawHandler } from '../../types.js'; export declare const configureProviderSchema: z.ZodObject<{ tier: z.ZodEnum<{ standard: "standard"; complex: "complex"; main: "main"; }>; provider: z.ZodEnum<{ claude: "claude"; codex: "codex"; }>; model: z.ZodString; auth: z.ZodDiscriminatedUnion<[z.ZodObject<{ mode: z.ZodLiteral<"oauth">; }, z.core.$strip>, z.ZodObject<{ mode: z.ZodLiteral<"api-key">; apiKey: z.ZodOptional; apiKeyEnv: z.ZodOptional; baseUrl: z.ZodOptional; }, z.core.$strip>], "mode">; dryRun: z.ZodDefault; }, z.core.$strip>; export type ConfigureProviderRequest = z.infer; export interface ProbeResult { reachable: boolean; modelListed: boolean | null; detail: string; } export declare function probeApi(input: ConfigureProviderRequest): Promise; /** * The only part of a config `applyToConfig` and `persistConfig` read or write. * * Declaring `MultiModelConfig` here was over-wide in both directions. Neither function touches * anything but `agents`, and `MultiModelConfig.agents` is a CLOSED `{standard?, complex?, main?}` * shape while both write by dynamic tier key — so the signature demanded more than the functions * need AND described the wrong thing about the one field they use. Four casts existed only to * bridge that gap: two `as never` at the `mma setup` call sites, which erased the argument type * entirely, and two inside `applyToConfig`. Naming the real requirement removes all four. */ /** * One tier entry as these functions treat it: an open record that MAY carry `effort`. Open because * a tier written by an older release can hold keys this code does not know, and rewriting a tier * must not silently drop them. */ export type AgentTierEntry = Record & { effort?: string; }; export interface AgentsCarrier { agents?: Record; } export declare function applyToConfig(config: AgentsCarrier, input: ConfigureProviderRequest): void; export declare function persistConfig(configPath: string, config: AgentsCarrier): { ok: boolean; error?: string; }; export declare function buildConfigureProviderHandler(config: MultiModelConfig | undefined, configPath?: string): RawHandler; //# sourceMappingURL=configure-provider.d.ts.map