is_vision_model (src/vision_models.rs)

ironclaw · crates/domains/ironclaw_llm/src/vision_models.rs · rust · Apache-2.0
ai

Utility to detect vision-capable LLM models and suggest the best one from a list.

// Source: https://github.com/nearai/ironclaw | License: Apache-2.0 | Copyright 2026 NEAR AI
// Provided via justclaw.it.com; keep this notice with the code.
//! Vision model detection utilities.

/// Known vision-capable model families.
///
/// Matching is substring-based (see [`is_vision_model`]), so the Anthropic
/// entries must cover both naming schemes that ship in production: the older
/// version-first form (`claude-3-5-sonnet`, `claude-4-...`) and the current
/// tier-first form (`claude-opus-4-8`, `claude-sonnet-4-6`, `claude-haiku-4-5`,
/// `claude-fable-5`), including Bedrock-prefixed ids
/// (`anthropic.claude-opus-4-6-v1`). The substring `claude-4` does *not* appear
/// in `claude-opus-4-8`, so the tier-first patterns are load-bearing — without
/// them every current-generati

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key