ai-agent 0.13.4

Idiomatic agent sdk inspired by the claude code source leak
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Source: /data/home/swei/claudecode/openclaudecode/src/utils/model/model.ts
use crate::constants::env::ai;
use super::{Command, CommandCallResult};

pub fn create_model_command() -> Command {
    Command::prompt("model", "Set the AI model for Claude Code").argument_hint("[model]")
}

pub fn get_main_loop_model() -> String {
    std::env::var(ai::MODEL).unwrap_or_else(|_| "claude-sonnet-4-20250514".to_string())
}

pub fn render_model_name(model: &str) -> String {
    model.to_string()
}