Skip to main content

strategy_order_for

Function strategy_order_for 

Source
pub fn strategy_order_for(model_slug: &str) -> [ExtractionStrategy; 3]
Expand description

Per-model fallback strategy order, tried when no native tool call is present.

Why: Centralising the per-family order here (rather than scattering if slug.contains(...) checks through extract) keeps the matrix documented in exactly one place — see the module-level table above. What: Returns the three text-based strategies in priority order for model_slug. Matching is case-insensitive and substring-based, mirroring provider::openrouter::slug_supports_native_tools. Test: tests::strategy_order_prefers_angle_bracket_for_qwen_and_deepseek, tests::strategy_order_prefers_fenced_json_for_others.