OpenRouterDecisionModel unstable
Decision models backed by OpenRouter's alpha Decisions API.
Constructors
Creates a decision service that validates full choice and score distributions.
Missing distributions yield "NoDistribution" with decideSettled or
AiError.InvalidOutputError with decide.
Score indices map to criteria labels. Reported cost and the serving
provider are returned under metadata.openrouter.
Probabilities arrive rounded to two decimals, so small sum drift is rescaled.
Signature
declare const make: (...args: [options: { readonly config?: Pick<{ readonly model: string; readonly provider?: { readonly allow_fallbacks?: boolean | null; readonly data_collection?: "deny" | "allow" | null; readonly enforce_distillable_text?: boolean | null; readonly ignore?: readonly Array<string> | null; readonly max_price?: { readonly audio?: ... | ...; readonly completion?: ... | ...; readonly image?: ... | ...; readonly prompt?: ... | ...; readonly request?: ... | ...; }; readonly only?: readonly Array<string> | null; readonly options?: { readonly "01ai"?: ... | ...; readonly ai21?: ... | ...; readonly "aion-labs"?: ... | ...; readonly akashml?: ... | ...; readonly alibaba?: ... | ...; readonly "amazon-bedrock"?: ... | ...; readonly "amazon-bedrock/claude-on-aws"?: ... | ...; readonly "amazon-nova"?: ... | ...; readonly ambient?: ... | ...; readonly antdigital?: ... | ...; readonly anthropic?: ... | ...; readonly "anthropic/2"?: ... | ...; readonly anyscale?: ... | ...; readonly "arcee-ai"?: ... | ...; readonly assemblyai?: ... | ...; readonly "atlas-cloud"?: ... | ...; readonly atoma?: ... | ...; readonly avian?: ... | ...; readonly azure?: ... | ...; readonly baidu?: ... | ...; readonly baseten?: ... | ...; readonly "black-forest-labs"?: ... | ...; readonly byteplus?: ... | ...; readonly centml?: ... | ...; readonly cerebras?: ... | ...; readonly chutes?: ... | ...; readonly cirrascale?: ... | ...; readonly clarifai?: ... | ...; readonly "claude-on-aws"?: ... | ...; readonly cloudflare?: ... | ...; readonly cohere?: ... | ...; readonly coreweave?: ... | ...; readonly cosine?: ... | ...; readonly crofai?: ... | ...; readonly crucible?: ... | ...; readonly crusoe?: ... | ...; readonly darkbloom?: ... | ...; readonly databricks?: ... | ...; readonly decart?: ... | ...; readonly deepgram?: ... | ...; readonly deepinfra?: ... | ...; readonly deepseek?: ... | ...; readonly dekallm?: ... | ...; readonly digitalocean?: ... | ...; readonly elevenlabs?: ... | ...; readonly enfer?: ... | ...; readonly "fake-provider"?: ... | ...; readonly featherless?: ... | ...; readonly fireworks?: ... | ...; readonly "fish-audio"?: ... | ...; readonly friendli?: ... | ...; readonly gmicloud?: ... | ...; readonly "google-ai-studio"?: ... | ...; readonly "google-vertex"?: ... | ...; readonly gopomelo?: ... | ...; readonly groq?: ... | ...; readonly heygen?: ... | ...; readonly huggingface?: ... | ...; readonly hyperbolic?: ... | ...; readonly "hyperbolic-quantized"?: ... | ...; readonly inception?: ... | ...; readonly inceptron?: ... | ...; readonly "inferact-vllm"?: ... | ...; readonly "inference-net"?: ... | ...; readonly infermatic?: ... | ...; readonly inflection?: ... | ...; readonly inocloud?: ... | ...; readonly "io-net"?: ... | ...; readonly ionstream?: ... | ...; readonly klusterai?: ... | ...; readonly krea?: ... | ...; readonly kt?: ... | ...; readonly lambda?: ... | ...; readonly lepton?: ... | ...; readonly liquid?: ... | ...; readonly lynn?: ... | ...; readonly "lynn-private"?: ... | ...; readonly makora?: ... | ...; readonly mancer?: ... | ...; readonly "mancer-old"?: ... | ...; readonly mara?: ... | ...; readonly meta?: ... | ...; readonly minimax?: ... | ...; readonly mistral?: ... | ...; readonly modal?: ... | ...; readonly modelrun?: ... | ...; readonly modular?: ... | ...; readonly moonshotai?: ... | ...; readonly morph?: ... | ...; readonly ncompass?: ... | ...; readonly "near-ai"?: ... | ...; readonly nebius?: ... | ...; readonly "nex-agi"?: ... | ...; readonly nextbit?: ... | ...; readonly nineteen?: ... | ...; readonly novita?: ... | ...; readonly nvidia?: ... | ...; readonly octoai?: ... | ...; readonly ollama?: ... | ...; readonly "open-inference"?: ... | ...; readonly openai?: ... | ...; readonly parallel?: ... | ...; readonly parasail?: ... | ...; readonly "pareto-alpha"?: ... | ...; readonly "particle-ai"?: ... | ...; readonly "pearl-research"?: ... | ...; readonly perceptron?: ... | ...; readonly perplexity?: ... | ...; readonly phala?: ... | ...; readonly poolside?: ... | ...; readonly primalabs?: ... | ...; readonly primeintellect?: ... | ...; readonly quiver?: ... | ...; readonly recraft?: ... | ...; readonly recursal?: ... | ...; readonly recursive?: ... | ...; readonly reflection?: ... | ...; readonly reka?: ... | ...; readonly relace?: ... | ...; readonly replicate?: ... | ...; readonly respan?: ... | ...; readonly river?: ... | ...; readonly runway?: ... | ...; readonly "sail-research"?: ... | ...; readonly sakana?: ... | ...; readonly "sakana-ai"?: ... | ...; readonly sambanova?: ... | ...; readonly "sambanova-cloaked"?: ... | ...; readonly scaledown?: ... | ...; readonly seed?: ... | ...; readonly "sf-compute"?: ... | ...; readonly siliconflow?: ... | ...; readonly sourceful?: ... | ...; readonly stealth?: ... | ...; readonly stepfun?: ... | ...; readonly streamlake?: ... | ...; readonly switchpoint?: ... | ...; readonly targon?: ... | ...; readonly tencent?: ... | ...; readonly tenstorrent?: ... | ...; readonly thinkingmachines?: ... | ...; readonly together?: ... | ...; readonly "together-lite"?: ... | ...; readonly typesafe?: ... | ...; readonly ubicloud?: ... | ...; readonly unbiased?: ... | ...; readonly upstage?: ... | ...; readonly venice?: ... | ...; readonly voyageai?: ... | ...; readonly wafer?: ... | ...; readonly wandb?: ... | ...; readonly "wandb-legacy"?: ... | ...; readonly xai?: ... | ...; readonly xiaomi?: ... | ...; readonly "z-ai"?: ... | ...; }; readonly order?: readonly Array<string> | null; readonly preferred_max_latency?: number | { readonly p50?: ... | ... | ...; readonly p75?: ... | ... | ...; readonly p90?: ... | ... | ...; readonly p99?: ... | ... | ...; } | null; readonly preferred_min_throughput?: number | { readonly p50?: ... | ... | ...; readonly p75?: ... | ... | ...; readonly p90?: ... | ... | ...; readonly p99?: ... | ... | ...; } | null; readonly quantizations?: readonly Array<... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ...> | null; readonly require_parameters?: boolean | null; readonly sort?: "price" | "throughput" | "latency" | "exacto" | { readonly by?: ... | ... | ... | ... | ... | ...; readonly partition?: ... | ... | ... | ...; } | null; readonly zdr?: boolean | null; } | null; readonly questions: { [key: string]: { readonly criteria: { [key: string]: ... | ... | ... | ...; }; readonly instructions: string | { [key: ...]: ...; } | readonly Array<...>; readonly type: "choice"; } | { readonly criteria: readonly Array<... | ... | ...>; readonly instructions: string | { [key: ...]: ...; } | readonly Array<...>; readonly type: "score"; } | { readonly criteria?: { readonly false: ...; readonly true: ...; }; readonly instructions: string | { [key: ...]: ...; } | readonly Array<...>; readonly type: "noul"; }; }; readonly session_id?: string; readonly state: unknown; readonly trace?: { [key: string]: unknown; }; readonly user?: string; }, "provider" | "session_id" | "user" | "trace">; readonly model: string;}]) => Effect<DecisionModel, never, OpenRouterClient>Creates an OpenRouter model descriptor with decision support.
Signature
declare function model(model: string, config?: Pick<{ readonly model: string; readonly provider?: { readonly allow_fallbacks?: boolean | null; readonly data_collection?: "deny" | "allow" | null; readonly enforce_distillable_text?: boolean | null; readonly ignore?: readonly Array<string> | null; readonly max_price?: { readonly audio?: string; readonly completion?: string; readonly image?: string; readonly prompt?: string; readonly request?: string; }; readonly only?: readonly Array<string> | null; readonly options?: { readonly "01ai"?: { [key: string]: Json; }; readonly ai21?: { [key: string]: Json; }; readonly "aion-labs"?: { [key: string]: Json; }; readonly akashml?: { [key: string]: Json; }; readonly alibaba?: { [key: string]: Json; }; readonly "amazon-bedrock"?: { [key: string]: Json; }; readonly "amazon-bedrock/claude-on-aws"?: { [key: string]: Json; }; readonly "amazon-nova"?: { [key: string]: Json; }; readonly ambient?: { [key: string]: Json; }; readonly antdigital?: { [key: string]: Json; }; readonly anthropic?: { [key: string]: Json; }; readonly "anthropic/2"?: { [key: string]: Json; }; readonly anyscale?: { [key: string]: Json; }; readonly "arcee-ai"?: { [key: string]: Json; }; readonly assemblyai?: { [key: string]: Json; }; readonly "atlas-cloud"?: { [key: string]: Json; }; readonly atoma?: { [key: string]: Json; }; readonly avian?: { [key: string]: Json; }; readonly azure?: { [key: string]: Json; }; readonly baidu?: { [key: string]: Json; }; readonly baseten?: { [key: string]: Json; }; readonly "black-forest-labs"?: { [key: string]: Json; }; readonly byteplus?: { [key: string]: Json; }; readonly centml?: { [key: string]: Json; }; readonly cerebras?: { [key: string]: Json; }; readonly chutes?: { [key: string]: Json; }; readonly cirrascale?: { [key: string]: Json; }; readonly clarifai?: { [key: string]: Json; }; readonly "claude-on-aws"?: { [key: string]: Json; }; readonly cloudflare?: { [key: string]: Json; }; readonly cohere?: { [key: string]: Json; }; readonly coreweave?: { [key: string]: Json; }; readonly cosine?: { [key: string]: Json; }; readonly crofai?: { [key: string]: Json; }; readonly crucible?: { [key: string]: Json; }; readonly crusoe?: { [key: string]: Json; }; readonly darkbloom?: { [key: string]: Json; }; readonly databricks?: { [key: string]: Json; }; readonly decart?: { [key: string]: Json; }; readonly deepgram?: { [key: string]: Json; }; readonly deepinfra?: { [key: string]: Json; }; readonly deepseek?: { [key: string]: Json; }; readonly dekallm?: { [key: string]: Json; }; readonly digitalocean?: { [key: string]: Json; }; readonly elevenlabs?: { [key: string]: Json; }; readonly enfer?: { [key: string]: Json; }; readonly "fake-provider"?: { [key: string]: Json; }; readonly featherless?: { [key: string]: Json; }; readonly fireworks?: { [key: string]: Json; }; readonly "fish-audio"?: { [key: string]: Json; }; readonly friendli?: { [key: string]: Json; }; readonly gmicloud?: { [key: string]: Json; }; readonly "google-ai-studio"?: { [key: string]: Json; }; readonly "google-vertex"?: { [key: string]: Json; }; readonly gopomelo?: { [key: string]: Json; }; readonly groq?: { [key: string]: Json; }; readonly heygen?: { [key: string]: Json; }; readonly huggingface?: { [key: string]: Json; }; readonly hyperbolic?: { [key: string]: Json; }; readonly "hyperbolic-quantized"?: { [key: string]: Json; }; readonly inception?: { [key: string]: Json; }; readonly inceptron?: { [key: string]: Json; }; readonly "inferact-vllm"?: { [key: string]: Json; }; readonly "inference-net"?: { [key: string]: Json; }; readonly infermatic?: { [key: string]: Json; }; readonly inflection?: { [key: string]: Json; }; readonly inocloud?: { [key: string]: Json; }; readonly "io-net"?: { [key: string]: Json; }; readonly ionstream?: { [key: string]: Json; }; readonly klusterai?: { [key: string]: Json; }; readonly krea?: { [key: string]: Json; }; readonly kt?: { [key: string]: Json; }; readonly lambda?: { [key: string]: Json; }; readonly lepton?: { [key: string]: Json; }; readonly liquid?: { [key: string]: Json; }; readonly lynn?: { [key: string]: Json; }; readonly "lynn-private"?: { [key: string]: Json; }; readonly makora?: { [key: string]: Json; }; readonly mancer?: { [key: string]: Json; }; readonly "mancer-old"?: { [key: string]: Json; }; readonly mara?: { [key: string]: Json; }; readonly meta?: { [key: string]: Json; }; readonly minimax?: { [key: string]: Json; }; readonly mistral?: { [key: string]: Json; }; readonly modal?: { [key: string]: Json; }; readonly modelrun?: { [key: string]: Json; }; readonly modular?: { [key: string]: Json; }; readonly moonshotai?: { [key: string]: Json; }; readonly morph?: { [key: string]: Json; }; readonly ncompass?: { [key: string]: Json; }; readonly "near-ai"?: { [key: string]: Json; }; readonly nebius?: { [key: string]: Json; }; readonly "nex-agi"?: { [key: string]: Json; }; readonly nextbit?: { [key: string]: Json; }; readonly nineteen?: { [key: string]: Json; }; readonly novita?: { [key: string]: Json; }; readonly nvidia?: { [key: string]: Json; }; readonly octoai?: { [key: string]: Json; }; readonly ollama?: { [key: string]: Json; }; readonly "open-inference"?: { [key: string]: Json; }; readonly openai?: { [key: string]: Json; }; readonly parallel?: { [key: string]: Json; }; readonly parasail?: { [key: string]: Json; }; readonly "pareto-alpha"?: { [key: string]: Json; }; readonly "particle-ai"?: { [key: string]: Json; }; readonly "pearl-research"?: { [key: string]: Json; }; readonly perceptron?: { [key: string]: Json; }; readonly perplexity?: { [key: string]: Json; }; readonly phala?: { [key: string]: Json; }; readonly poolside?: { [key: string]: Json; }; readonly primalabs?: { [key: string]: Json; }; readonly primeintellect?: { [key: string]: Json; }; readonly quiver?: { [key: string]: Json; }; readonly recraft?: { [key: string]: Json; }; readonly recursal?: { [key: string]: Json; }; readonly recursive?: { [key: string]: Json; }; readonly reflection?: { [key: string]: Json; }; readonly reka?: { [key: string]: Json; }; readonly relace?: { [key: string]: Json; }; readonly replicate?: { [key: string]: Json; }; readonly respan?: { [key: string]: Json; }; readonly river?: { [key: string]: Json; }; readonly runway?: { [key: string]: Json; }; readonly "sail-research"?: { [key: string]: Json; }; readonly sakana?: { [key: string]: Json; }; readonly "sakana-ai"?: { [key: string]: Json; }; readonly sambanova?: { [key: string]: Json; }; readonly "sambanova-cloaked"?: { [key: string]: Json; }; readonly scaledown?: { [key: string]: Json; }; readonly seed?: { [key: string]: Json; }; readonly "sf-compute"?: { [key: string]: Json; }; readonly siliconflow?: { [key: string]: Json; }; readonly sourceful?: { [key: string]: Json; }; readonly stealth?: { [key: string]: Json; }; readonly stepfun?: { [key: string]: Json; }; readonly streamlake?: { [key: string]: Json; }; readonly switchpoint?: { [key: string]: Json; }; readonly targon?: { [key: string]: Json; }; readonly tencent?: { [key: string]: Json; }; readonly tenstorrent?: { [key: string]: Json; }; readonly thinkingmachines?: { [key: string]: Json; }; readonly together?: { [key: string]: Json; }; readonly "together-lite"?: { [key: string]: Json; }; readonly typesafe?: { [key: string]: Json; }; readonly ubicloud?: { [key: string]: Json; }; readonly unbiased?: { [key: string]: Json; }; readonly upstage?: { [key: string]: Json; }; readonly venice?: { [key: string]: Json; }; readonly voyageai?: { [key: string]: Json; }; readonly wafer?: { [key: string]: Json; }; readonly wandb?: { [key: string]: Json; }; readonly "wandb-legacy"?: { [key: string]: Json; }; readonly xai?: { [key: string]: Json; }; readonly xiaomi?: { [key: string]: Json; }; readonly "z-ai"?: { [key: string]: Json; }; }; readonly order?: readonly Array<string> | null; readonly preferred_max_latency?: number | { readonly p50?: number | null; readonly p75?: number | null; readonly p90?: number | null; readonly p99?: number | null; } | null; readonly preferred_min_throughput?: number | { readonly p50?: number | null; readonly p75?: number | null; readonly p90?: number | null; readonly p99?: number | null; } | null; readonly quantizations?: readonly Array<"int4" | "int8" | "fp4" | "mxfp4" | "nvfp4" | "fp6" | "fp8" | "mxfp8" | "fp16" | "bf16" | "fp32" | "unknown"> | null; readonly require_parameters?: boolean | null; readonly sort?: "price" | "throughput" | "latency" | "exacto" | { readonly by?: "price" | "throughput" | "latency" | "exacto" | null; readonly partition?: "model" | "none" | null; } | null; readonly zdr?: boolean | null; } | null; readonly questions: { [key: string]: { readonly criteria: { [key: string]: string | { [key: string]: Json; } | readonly Array<Json> | null; }; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "choice"; } | { readonly criteria: readonly Array<string | { [key: string]: Json; } | readonly Array<Json>>; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "score"; } | { readonly criteria?: { readonly false: string | { [key: string]: Json; } | readonly Array<Json>; readonly true: string | { [key: string]: Json; } | readonly Array<Json>; }; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "noul"; }; }; readonly session_id?: string; readonly state: unknown; readonly trace?: { [key: string]: unknown; }; readonly user?: string;}, "provider" | "session_id" | "user" | "trace">): Model<"openrouter", DecisionModel, OpenRouterClient>Layers
Provides a decision model using the OpenRouter client service.
Signature
declare function layer(options: { readonly config?: Pick<{ readonly model: string; readonly provider?: { readonly allow_fallbacks?: boolean | null; readonly data_collection?: "deny" | "allow" | null; readonly enforce_distillable_text?: boolean | null; readonly ignore?: readonly Array<string> | null; readonly max_price?: { readonly audio?: string; readonly completion?: string; readonly image?: string; readonly prompt?: string; readonly request?: string; }; readonly only?: readonly Array<string> | null; readonly options?: { readonly "01ai"?: { [key: string]: Json; }; readonly ai21?: { [key: string]: Json; }; readonly "aion-labs"?: { [key: string]: Json; }; readonly akashml?: { [key: string]: Json; }; readonly alibaba?: { [key: string]: Json; }; readonly "amazon-bedrock"?: { [key: string]: Json; }; readonly "amazon-bedrock/claude-on-aws"?: { [key: string]: Json; }; readonly "amazon-nova"?: { [key: string]: Json; }; readonly ambient?: { [key: string]: Json; }; readonly antdigital?: { [key: string]: Json; }; readonly anthropic?: { [key: string]: Json; }; readonly "anthropic/2"?: { [key: string]: Json; }; readonly anyscale?: { [key: string]: Json; }; readonly "arcee-ai"?: { [key: string]: Json; }; readonly assemblyai?: { [key: string]: Json; }; readonly "atlas-cloud"?: { [key: string]: Json; }; readonly atoma?: { [key: string]: Json; }; readonly avian?: { [key: string]: Json; }; readonly azure?: { [key: string]: Json; }; readonly baidu?: { [key: string]: Json; }; readonly baseten?: { [key: string]: Json; }; readonly "black-forest-labs"?: { [key: string]: Json; }; readonly byteplus?: { [key: string]: Json; }; readonly centml?: { [key: string]: Json; }; readonly cerebras?: { [key: string]: Json; }; readonly chutes?: { [key: string]: Json; }; readonly cirrascale?: { [key: string]: Json; }; readonly clarifai?: { [key: string]: Json; }; readonly "claude-on-aws"?: { [key: string]: Json; }; readonly cloudflare?: { [key: string]: Json; }; readonly cohere?: { [key: string]: Json; }; readonly coreweave?: { [key: string]: Json; }; readonly cosine?: { [key: string]: Json; }; readonly crofai?: { [key: string]: Json; }; readonly crucible?: { [key: string]: Json; }; readonly crusoe?: { [key: string]: Json; }; readonly darkbloom?: { [key: string]: Json; }; readonly databricks?: { [key: string]: Json; }; readonly decart?: { [key: string]: Json; }; readonly deepgram?: { [key: string]: Json; }; readonly deepinfra?: { [key: string]: Json; }; readonly deepseek?: { [key: string]: Json; }; readonly dekallm?: { [key: string]: Json; }; readonly digitalocean?: { [key: string]: Json; }; readonly elevenlabs?: { [key: string]: Json; }; readonly enfer?: { [key: string]: Json; }; readonly "fake-provider"?: { [key: string]: Json; }; readonly featherless?: { [key: string]: Json; }; readonly fireworks?: { [key: string]: Json; }; readonly "fish-audio"?: { [key: string]: Json; }; readonly friendli?: { [key: string]: Json; }; readonly gmicloud?: { [key: string]: Json; }; readonly "google-ai-studio"?: { [key: string]: Json; }; readonly "google-vertex"?: { [key: string]: Json; }; readonly gopomelo?: { [key: string]: Json; }; readonly groq?: { [key: string]: Json; }; readonly heygen?: { [key: string]: Json; }; readonly huggingface?: { [key: string]: Json; }; readonly hyperbolic?: { [key: string]: Json; }; readonly "hyperbolic-quantized"?: { [key: string]: Json; }; readonly inception?: { [key: string]: Json; }; readonly inceptron?: { [key: string]: Json; }; readonly "inferact-vllm"?: { [key: string]: Json; }; readonly "inference-net"?: { [key: string]: Json; }; readonly infermatic?: { [key: string]: Json; }; readonly inflection?: { [key: string]: Json; }; readonly inocloud?: { [key: string]: Json; }; readonly "io-net"?: { [key: string]: Json; }; readonly ionstream?: { [key: string]: Json; }; readonly klusterai?: { [key: string]: Json; }; readonly krea?: { [key: string]: Json; }; readonly kt?: { [key: string]: Json; }; readonly lambda?: { [key: string]: Json; }; readonly lepton?: { [key: string]: Json; }; readonly liquid?: { [key: string]: Json; }; readonly lynn?: { [key: string]: Json; }; readonly "lynn-private"?: { [key: string]: Json; }; readonly makora?: { [key: string]: Json; }; readonly mancer?: { [key: string]: Json; }; readonly "mancer-old"?: { [key: string]: Json; }; readonly mara?: { [key: string]: Json; }; readonly meta?: { [key: string]: Json; }; readonly minimax?: { [key: string]: Json; }; readonly mistral?: { [key: string]: Json; }; readonly modal?: { [key: string]: Json; }; readonly modelrun?: { [key: string]: Json; }; readonly modular?: { [key: string]: Json; }; readonly moonshotai?: { [key: string]: Json; }; readonly morph?: { [key: string]: Json; }; readonly ncompass?: { [key: string]: Json; }; readonly "near-ai"?: { [key: string]: Json; }; readonly nebius?: { [key: string]: Json; }; readonly "nex-agi"?: { [key: string]: Json; }; readonly nextbit?: { [key: string]: Json; }; readonly nineteen?: { [key: string]: Json; }; readonly novita?: { [key: string]: Json; }; readonly nvidia?: { [key: string]: Json; }; readonly octoai?: { [key: string]: Json; }; readonly ollama?: { [key: string]: Json; }; readonly "open-inference"?: { [key: string]: Json; }; readonly openai?: { [key: string]: Json; }; readonly parallel?: { [key: string]: Json; }; readonly parasail?: { [key: string]: Json; }; readonly "pareto-alpha"?: { [key: string]: Json; }; readonly "particle-ai"?: { [key: string]: Json; }; readonly "pearl-research"?: { [key: string]: Json; }; readonly perceptron?: { [key: string]: Json; }; readonly perplexity?: { [key: string]: Json; }; readonly phala?: { [key: string]: Json; }; readonly poolside?: { [key: string]: Json; }; readonly primalabs?: { [key: string]: Json; }; readonly primeintellect?: { [key: string]: Json; }; readonly quiver?: { [key: string]: Json; }; readonly recraft?: { [key: string]: Json; }; readonly recursal?: { [key: string]: Json; }; readonly recursive?: { [key: string]: Json; }; readonly reflection?: { [key: string]: Json; }; readonly reka?: { [key: string]: Json; }; readonly relace?: { [key: string]: Json; }; readonly replicate?: { [key: string]: Json; }; readonly respan?: { [key: string]: Json; }; readonly river?: { [key: string]: Json; }; readonly runway?: { [key: string]: Json; }; readonly "sail-research"?: { [key: string]: Json; }; readonly sakana?: { [key: string]: Json; }; readonly "sakana-ai"?: { [key: string]: Json; }; readonly sambanova?: { [key: string]: Json; }; readonly "sambanova-cloaked"?: { [key: string]: Json; }; readonly scaledown?: { [key: string]: Json; }; readonly seed?: { [key: string]: Json; }; readonly "sf-compute"?: { [key: string]: Json; }; readonly siliconflow?: { [key: string]: Json; }; readonly sourceful?: { [key: string]: Json; }; readonly stealth?: { [key: string]: Json; }; readonly stepfun?: { [key: string]: Json; }; readonly streamlake?: { [key: string]: Json; }; readonly switchpoint?: { [key: string]: Json; }; readonly targon?: { [key: string]: Json; }; readonly tencent?: { [key: string]: Json; }; readonly tenstorrent?: { [key: string]: Json; }; readonly thinkingmachines?: { [key: string]: Json; }; readonly together?: { [key: string]: Json; }; readonly "together-lite"?: { [key: string]: Json; }; readonly typesafe?: { [key: string]: Json; }; readonly ubicloud?: { [key: string]: Json; }; readonly unbiased?: { [key: string]: Json; }; readonly upstage?: { [key: string]: Json; }; readonly venice?: { [key: string]: Json; }; readonly voyageai?: { [key: string]: Json; }; readonly wafer?: { [key: string]: Json; }; readonly wandb?: { [key: string]: Json; }; readonly "wandb-legacy"?: { [key: string]: Json; }; readonly xai?: { [key: string]: Json; }; readonly xiaomi?: { [key: string]: Json; }; readonly "z-ai"?: { [key: string]: Json; }; }; readonly order?: readonly Array<string> | null; readonly preferred_max_latency?: number | { readonly p50?: number | null; readonly p75?: number | null; readonly p90?: number | null; readonly p99?: number | null; } | null; readonly preferred_min_throughput?: number | { readonly p50?: number | null; readonly p75?: number | null; readonly p90?: number | null; readonly p99?: number | null; } | null; readonly quantizations?: readonly Array<"int4" | "int8" | "fp4" | "mxfp4" | "nvfp4" | "fp6" | "fp8" | "mxfp8" | "fp16" | "bf16" | "fp32" | "unknown"> | null; readonly require_parameters?: boolean | null; readonly sort?: "price" | "throughput" | "latency" | "exacto" | { readonly by?: "price" | "throughput" | "latency" | "exacto" | null; readonly partition?: "model" | "none" | null; } | null; readonly zdr?: boolean | null; } | null; readonly questions: { [key: string]: { readonly criteria: { [key: string]: string | { [key: string]: Json; } | readonly Array<Json> | null; }; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "choice"; } | { readonly criteria: readonly Array<string | { [key: string]: Json; } | readonly Array<Json>>; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "score"; } | { readonly criteria?: { readonly false: string | { [key: ...]: ...; } | readonly Array<...>; readonly true: string | { [key: ...]: ...; } | readonly Array<...>; }; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "noul"; }; }; readonly session_id?: string; readonly state: unknown; readonly trace?: { [key: string]: unknown; }; readonly user?: string; }, "provider" | "session_id" | "user" | "trace">; readonly model: string;}): Layer<DecisionModel, never, OpenRouterClient>Services
Request options that override model defaults at call time.
Signature
declare class Config extends Shape<"@effect/ai-openrouter/OpenRouterDecisionModel/Config", Pick<{ readonly model: string; readonly provider?: { readonly allow_fallbacks?: boolean | null; readonly data_collection?: "deny" | "allow" | null; readonly enforce_distillable_text?: boolean | null; readonly ignore?: readonly Array<string> | null; readonly max_price?: { readonly audio?: string; readonly completion?: string; readonly image?: string; readonly prompt?: string; readonly request?: string; }; readonly only?: readonly Array<string> | null; readonly options?: { readonly "01ai"?: { [key: string]: Json; }; readonly ai21?: { [key: string]: Json; }; readonly "aion-labs"?: { [key: string]: Json; }; readonly akashml?: { [key: string]: Json; }; readonly alibaba?: { [key: string]: Json; }; readonly "amazon-bedrock"?: { [key: string]: Json; }; readonly "amazon-bedrock/claude-on-aws"?: { [key: string]: Json; }; readonly "amazon-nova"?: { [key: string]: Json; }; readonly ambient?: { [key: string]: Json; }; readonly antdigital?: { [key: string]: Json; }; readonly anthropic?: { [key: string]: Json; }; readonly "anthropic/2"?: { [key: string]: Json; }; readonly anyscale?: { [key: string]: Json; }; readonly "arcee-ai"?: { [key: string]: Json; }; readonly assemblyai?: { [key: string]: Json; }; readonly "atlas-cloud"?: { [key: string]: Json; }; readonly atoma?: { [key: string]: Json; }; readonly avian?: { [key: string]: Json; }; readonly azure?: { [key: string]: Json; }; readonly baidu?: { [key: string]: Json; }; readonly baseten?: { [key: string]: Json; }; readonly "black-forest-labs"?: { [key: string]: Json; }; readonly byteplus?: { [key: string]: Json; }; readonly centml?: { [key: string]: Json; }; readonly cerebras?: { [key: string]: Json; }; readonly chutes?: { [key: string]: Json; }; readonly cirrascale?: { [key: string]: Json; }; readonly clarifai?: { [key: string]: Json; }; readonly "claude-on-aws"?: { [key: string]: Json; }; readonly cloudflare?: { [key: string]: Json; }; readonly cohere?: { [key: string]: Json; }; readonly coreweave?: { [key: string]: Json; }; readonly cosine?: { [key: string]: Json; }; readonly crofai?: { [key: string]: Json; }; readonly crucible?: { [key: string]: Json; }; readonly crusoe?: { [key: string]: Json; }; readonly darkbloom?: { [key: string]: Json; }; readonly databricks?: { [key: string]: Json; }; readonly decart?: { [key: string]: Json; }; readonly deepgram?: { [key: string]: Json; }; readonly deepinfra?: { [key: string]: Json; }; readonly deepseek?: { [key: string]: Json; }; readonly dekallm?: { [key: string]: Json; }; readonly digitalocean?: { [key: string]: Json; }; readonly elevenlabs?: { [key: string]: Json; }; readonly enfer?: { [key: string]: Json; }; readonly "fake-provider"?: { [key: string]: Json; }; readonly featherless?: { [key: string]: Json; }; readonly fireworks?: { [key: string]: Json; }; readonly "fish-audio"?: { [key: string]: Json; }; readonly friendli?: { [key: string]: Json; }; readonly gmicloud?: { [key: string]: Json; }; readonly "google-ai-studio"?: { [key: string]: Json; }; readonly "google-vertex"?: { [key: string]: Json; }; readonly gopomelo?: { [key: string]: Json; }; readonly groq?: { [key: string]: Json; }; readonly heygen?: { [key: string]: Json; }; readonly huggingface?: { [key: string]: Json; }; readonly hyperbolic?: { [key: string]: Json; }; readonly "hyperbolic-quantized"?: { [key: string]: Json; }; readonly inception?: { [key: string]: Json; }; readonly inceptron?: { [key: string]: Json; }; readonly "inferact-vllm"?: { [key: string]: Json; }; readonly "inference-net"?: { [key: string]: Json; }; readonly infermatic?: { [key: string]: Json; }; readonly inflection?: { [key: string]: Json; }; readonly inocloud?: { [key: string]: Json; }; readonly "io-net"?: { [key: string]: Json; }; readonly ionstream?: { [key: string]: Json; }; readonly klusterai?: { [key: string]: Json; }; readonly krea?: { [key: string]: Json; }; readonly kt?: { [key: string]: Json; }; readonly lambda?: { [key: string]: Json; }; readonly lepton?: { [key: string]: Json; }; readonly liquid?: { [key: string]: Json; }; readonly lynn?: { [key: string]: Json; }; readonly "lynn-private"?: { [key: string]: Json; }; readonly makora?: { [key: string]: Json; }; readonly mancer?: { [key: string]: Json; }; readonly "mancer-old"?: { [key: string]: Json; }; readonly mara?: { [key: string]: Json; }; readonly meta?: { [key: string]: Json; }; readonly minimax?: { [key: string]: Json; }; readonly mistral?: { [key: string]: Json; }; readonly modal?: { [key: string]: Json; }; readonly modelrun?: { [key: string]: Json; }; readonly modular?: { [key: string]: Json; }; readonly moonshotai?: { [key: string]: Json; }; readonly morph?: { [key: string]: Json; }; readonly ncompass?: { [key: string]: Json; }; readonly "near-ai"?: { [key: string]: Json; }; readonly nebius?: { [key: string]: Json; }; readonly "nex-agi"?: { [key: string]: Json; }; readonly nextbit?: { [key: string]: Json; }; readonly nineteen?: { [key: string]: Json; }; readonly novita?: { [key: string]: Json; }; readonly nvidia?: { [key: string]: Json; }; readonly octoai?: { [key: string]: Json; }; readonly ollama?: { [key: string]: Json; }; readonly "open-inference"?: { [key: string]: Json; }; readonly openai?: { [key: string]: Json; }; readonly parallel?: { [key: string]: Json; }; readonly parasail?: { [key: string]: Json; }; readonly "pareto-alpha"?: { [key: string]: Json; }; readonly "particle-ai"?: { [key: string]: Json; }; readonly "pearl-research"?: { [key: string]: Json; }; readonly perceptron?: { [key: string]: Json; }; readonly perplexity?: { [key: string]: Json; }; readonly phala?: { [key: string]: Json; }; readonly poolside?: { [key: string]: Json; }; readonly primalabs?: { [key: string]: Json; }; readonly primeintellect?: { [key: string]: Json; }; readonly quiver?: { [key: string]: Json; }; readonly recraft?: { [key: string]: Json; }; readonly recursal?: { [key: string]: Json; }; readonly recursive?: { [key: string]: Json; }; readonly reflection?: { [key: string]: Json; }; readonly reka?: { [key: string]: Json; }; readonly relace?: { [key: string]: Json; }; readonly replicate?: { [key: string]: Json; }; readonly respan?: { [key: string]: Json; }; readonly river?: { [key: string]: Json; }; readonly runway?: { [key: string]: Json; }; readonly "sail-research"?: { [key: string]: Json; }; readonly sakana?: { [key: string]: Json; }; readonly "sakana-ai"?: { [key: string]: Json; }; readonly sambanova?: { [key: string]: Json; }; readonly "sambanova-cloaked"?: { [key: string]: Json; }; readonly scaledown?: { [key: string]: Json; }; readonly seed?: { [key: string]: Json; }; readonly "sf-compute"?: { [key: string]: Json; }; readonly siliconflow?: { [key: string]: Json; }; readonly sourceful?: { [key: string]: Json; }; readonly stealth?: { [key: string]: Json; }; readonly stepfun?: { [key: string]: Json; }; readonly streamlake?: { [key: string]: Json; }; readonly switchpoint?: { [key: string]: Json; }; readonly targon?: { [key: string]: Json; }; readonly tencent?: { [key: string]: Json; }; readonly tenstorrent?: { [key: string]: Json; }; readonly thinkingmachines?: { [key: string]: Json; }; readonly together?: { [key: string]: Json; }; readonly "together-lite"?: { [key: string]: Json; }; readonly typesafe?: { [key: string]: Json; }; readonly ubicloud?: { [key: string]: Json; }; readonly unbiased?: { [key: string]: Json; }; readonly upstage?: { [key: string]: Json; }; readonly venice?: { [key: string]: Json; }; readonly voyageai?: { [key: string]: Json; }; readonly wafer?: { [key: string]: Json; }; readonly wandb?: { [key: string]: Json; }; readonly "wandb-legacy"?: { [key: string]: Json; }; readonly xai?: { [key: string]: Json; }; readonly xiaomi?: { [key: string]: Json; }; readonly "z-ai"?: { [key: string]: Json; }; }; readonly order?: readonly Array<string> | null; readonly preferred_max_latency?: number | { readonly p50?: number | null; readonly p75?: number | null; readonly p90?: number | null; readonly p99?: number | null; } | null; readonly preferred_min_throughput?: number | { readonly p50?: number | null; readonly p75?: number | null; readonly p90?: number | null; readonly p99?: number | null; } | null; readonly quantizations?: readonly Array<"int4" | "int8" | "fp4" | "mxfp4" | "nvfp4" | "fp6" | "fp8" | "mxfp8" | "fp16" | "bf16" | "fp32" | "unknown"> | null; readonly require_parameters?: boolean | null; readonly sort?: "price" | "throughput" | "latency" | "exacto" | { readonly by?: "price" | "throughput" | "latency" | "exacto" | null; readonly partition?: "model" | "none" | null; } | null; readonly zdr?: boolean | null; } | null; readonly questions: { [key: string]: { readonly criteria: { [key: string]: string | { [key: string]: Json; } | readonly Array<Json> | null; }; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "choice"; } | { readonly criteria: readonly Array<string | { [key: string]: Json; } | readonly Array<Json>>; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "score"; } | { readonly criteria?: { readonly false: string | { [key: ...]: ...; } | readonly Array<...>; readonly true: string | { [key: ...]: ...; } | readonly Array<...>; }; readonly instructions: string | { [key: string]: Json; } | readonly Array<Json>; readonly type: "noul"; }; }; readonly session_id?: string; readonly state: unknown; readonly trace?: { [key: string]: unknown; }; readonly user?: string;}, "provider" | "session_id" | "user" | "trace">, this> { constructor(_: never);}