mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
修复编译问题
This commit is contained in:
@@ -289,19 +289,19 @@ impl ProviderCredential {
|
||||
/// 解析当前凭证应采用的 Prompt Cache 模式。
|
||||
pub fn effective_prompt_cache_mode(&self) -> Option<ProviderPromptCacheMode> {
|
||||
self.prompt_cache_mode_override.or_else(|| {
|
||||
if self.provider_type.supports_anthropic_prompt_cache() {
|
||||
Some(ProviderPromptCacheMode::Automatic)
|
||||
} else if matches!(self.provider_type, PoolProviderType::AnthropicCompatible)
|
||||
&& is_known_automatic_anthropic_compatible_host(
|
||||
if matches!(self.provider_type, PoolProviderType::AnthropicCompatible) {
|
||||
return if is_known_automatic_anthropic_compatible_host(
|
||||
get_base_url(&self.credential).as_deref(),
|
||||
)
|
||||
{
|
||||
Some(ProviderPromptCacheMode::Automatic)
|
||||
} else if matches!(self.provider_type, PoolProviderType::AnthropicCompatible) {
|
||||
Some(ProviderPromptCacheMode::ExplicitOnly)
|
||||
} else {
|
||||
None
|
||||
) {
|
||||
Some(ProviderPromptCacheMode::Automatic)
|
||||
} else {
|
||||
Some(ProviderPromptCacheMode::ExplicitOnly)
|
||||
};
|
||||
}
|
||||
|
||||
self.provider_type
|
||||
.supports_anthropic_prompt_cache()
|
||||
.then_some(ProviderPromptCacheMode::Automatic)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -144,10 +144,6 @@ impl WorkspaceSandboxedBashTool {
|
||||
}
|
||||
}
|
||||
|
||||
fn format_output(stdout: &str, stderr: &str, exit_code: i32) -> String {
|
||||
Self::format_output_with_message(stdout, stderr, exit_code, None)
|
||||
}
|
||||
|
||||
fn format_output_with_message(
|
||||
stdout: &str,
|
||||
stderr: &str,
|
||||
|
||||
Reference in New Issue
Block a user