import type { LlmDecision, LlmDecisionRequest, LlmDecisionResponse } from '../types.js'; export interface OpenClawLlmDecisionOptions { gatewayUrl?: string; gatewayToken?: string; defaultModel?: string; } /** * Normalize a `decision_model` string into a `{ provider, model }` pair for the * OpenClaw `llm-task` call. * * Background: OpenClaw builds the final model identity as `provider + "/" + model`. * The provider comes from `agents.defaults.model.primary` (set by the railway * template), and the model from this plugin. If the YAML's `decision_model` * ALREADY carries a provider prefix (e.g. `google/gemini-3.1-pro-preview`) and we * forward it verbatim, OpenClaw v2026.2.22 glues it again → * `google/google/gemini-3.1-pro-preview` → "Unknown model". (v2026.5.7+ added a * de-dup, but prod boxes run v2026.2.22.) * * Fix: if the model contains a `/`, split on the FIRST slash and send the leading * segment as an explicit `provider` plus the remainder as a bare `model`. OpenClaw * then re-glues `provider + "/" + model` to the intended key with no duplication — * correct on v2026.2.22 AND a harmless no-op on v2026.5.7+ (the de-dup sees a bare * model). A bare input (no slash) is returned as model-only, so OpenClaw fills the * provider from `primary` as before. * * First-slash splitting also preserves aggregator ids: * `openrouter/google/gemini-3.1-pro-preview` → provider `openrouter`, model * `google/gemini-3.1-pro-preview`. * * Defensive edges (no provider extracted, returned as model-only): empty/undefined * input, leading slash (`/foo`), trailing slash (`foo/`). */ export declare function splitProviderModel(raw: string | undefined): { provider?: string; model?: string; }; export declare class OpenClawLlmDecision implements LlmDecision { private readonly gatewayUrl; private readonly gatewayToken?; private readonly defaultModel?; constructor(options?: OpenClawLlmDecisionOptions); decide(request: LlmDecisionRequest): Promise>; } //# sourceMappingURL=openclaw-llm-decision.d.ts.map