mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-22 00:01:50 +08:00
fix: resolve merge conflicts and test compatibility
- Resolve .gitignore conflict: include both nix entries and .claude/ - Update AnthropicRuntimeClient::new() test calls to match new signature - Fix explicit_model_provider_hint test to unset OPENAI_BASE_URL env var
This commit is contained in:
1 parent
8a19ecd7cc
commit
dfa1e4f71e
1 file changed
+8
-3
@@ -19970,6 +19970,9 @@ UU conflicted.rs",
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn explicit_model_provider_hint_controls_runtime_provider_dispatch() {
|
fn explicit_model_provider_hint_controls_runtime_provider_dispatch() {
|
||||||
|
let old_openai_base_url = std::env::var("OPENAI_BASE_URL").ok();
|
||||||
|
std::env::remove_var("OPENAI_BASE_URL");
|
||||||
|
|
||||||
let config = api::ProviderConfig {
|
let config = api::ProviderConfig {
|
||||||
kind: api::ProviderConfigKind::DashScope,
|
kind: api::ProviderConfigKind::DashScope,
|
||||||
model: "qwen-plus".to_string(),
|
model: "qwen-plus".to_string(),
|
||||||
@@ -19982,7 +19985,6 @@ UU conflicted.rs",
|
|||||||
"openai/gpt-5".to_string(),
|
"openai/gpt-5".to_string(),
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
TerminalTail::new(),
|
|
||||||
None,
|
None,
|
||||||
GlobalToolRegistry::builtin(),
|
GlobalToolRegistry::builtin(),
|
||||||
None,
|
None,
|
||||||
@@ -19990,7 +19992,7 @@ UU conflicted.rs",
|
|||||||
)
|
)
|
||||||
.expect("runtime client should construct from explicit model provider hint");
|
.expect("runtime client should construct from explicit model provider hint");
|
||||||
|
|
||||||
match runtime.client {
|
match &runtime.client {
|
||||||
api::ProviderClient::OpenAi(client) => {
|
api::ProviderClient::OpenAi(client) => {
|
||||||
assert!(client.base_url().contains("api.openai.com"));
|
assert!(client.base_url().contains("api.openai.com"));
|
||||||
assert!(!client.base_url().contains("dashscope.aliyuncs.com"));
|
assert!(!client.base_url().contains("dashscope.aliyuncs.com"));
|
||||||
@@ -19999,6 +20001,10 @@ UU conflicted.rs",
|
|||||||
"explicit OpenAI model prefix must override persisted DashScope configuration, got {other:?}"
|
"explicit OpenAI model prefix must override persisted DashScope configuration, got {other:?}"
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(value) = old_openai_base_url {
|
||||||
|
std::env::set_var("OPENAI_BASE_URL", value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -20042,7 +20048,6 @@ UU conflicted.rs",
|
|||||||
"qwen-plus".to_string(),
|
"qwen-plus".to_string(),
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
TerminalTail::new(),
|
|
||||||
None,
|
None,
|
||||||
GlobalToolRegistry::builtin(),
|
GlobalToolRegistry::builtin(),
|
||||||
None,
|
None,
|
||||||
|
|||||||
Reference in new issue
Block a user