Skip to main content

call_anthropic_plain

Function call_anthropic_plain 

Source
pub fn call_anthropic_plain(
    system: &str,
    user_prompt: &str,
) -> Result<String, String>
Expand description

Call the Anthropic Messages API with separate system and user prompts.

Reads ANTHROPIC_API_KEY from environment. Model defaults to claude-sonnet-4-5 but can be overridden via FERRO_AI_MODEL.

Uses Anthropic best practices: system prompt with cache_control, temperature 0.2 for deterministic output, and 60-second HTTP timeout.

Alias: also exported as call_anthropic_plain (the canonical name in Plan 05 interfaces).