MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_code_config_default_model_config

Function test_code_config_default_model_config

core/src/config/tests.rs:875–910  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

873
874#[test]
875fn test_code_config_default_model_config() {
876 let config = CodeConfig {
877 default_model: Some("anthropic/claude-sonnet-4".to_string()),
878 providers: vec![ProviderConfig {
879 name: "anthropic".to_string(),
880 api_key: Some("sk-test".to_string()),
881 base_url: None,
882 headers: HashMap::new(),
883 session_id_header: None,
884 models: vec![ModelConfig {
885 id: "claude-sonnet-4".to_string(),
886 name: "Claude Sonnet 4".to_string(),
887 family: "claude-sonnet".to_string(),
888 api_key: None,
889 base_url: None,
890 headers: HashMap::new(),
891 session_id_header: None,
892 attachment: false,
893 reasoning: false,
894 tool_call: true,
895 temperature: true,
896 release_date: None,
897 modalities: ModelModalities::default(),
898 cost: ModelCost::default(),
899 limit: ModelLimit::default(),
900 }],
901 }],
902 ..Default::default()
903 };
904
905 let result = config.default_model_config();
906 assert!(result.is_some());
907 let (provider, model) = result.unwrap();
908 assert_eq!(provider.name, "anthropic");
909 assert_eq!(model.id, "claude-sonnet-4");
910}
911
912#[test]
913fn test_code_config_default_llm_config() {

Callers

nothing calls this directly

Calls 1

default_model_configMethod · 0.80

Tested by

no test coverage detected