Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.02 KB

algorithm.mdx

File metadata and controls

26 lines (18 loc) · 1.02 KB
title Algorithm

Routing algorithm for this request. "capability" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. "stage" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge only when those signals are undecided. "auto" is "stage" without the judge call. "random" picks one candidate at random. "composite" keeps the tier chosen on the last human turn and re-evaluates tool turns with the stage signals. "passthrough" serves the eligible candidates in the order OpenRouter already ranked them, with no routing decision and no judge call. Omit this field to use the platform default, stage.

Example Usage

from openrouter.components import Algorithm

# Open enum: unrecognized values are captured as UnrecognizedStr
value: Algorithm = "capability"

Values

This is an open enum. Unrecognized values will not fail type checks.

  • "capability"
  • "stage"
  • "auto"
  • "random"
  • "composite"
  • "passthrough"