agentswitch 0.6.0

一个通用的 Code Agent 工具配置切换器,支持将任意 OpenAI/Anthropic 协议模型接入到主流 Code Agent CLI 工具中
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use agentswitch::config::ModelConfig;

#[test]
fn test_model_config_creation() {
    let config = ModelConfig::new(
        "test-model".to_string(),
        "https://api.test.com".to_string(),
        "test-key".to_string(),
        "test-model-id".to_string(),
    );

    assert_eq!(config.name, "test-model");
    assert_eq!(config.base_url, "https://api.test.com");
    assert_eq!(config.api_key, "test-key");
    assert_eq!(config.model_id, "test-model-id");
}