mirror of
https://github.com/instructkr/claw-code.git
synced 2026-05-18 21:41:26 +08:00
omx(team): auto-checkpoint worker-2 [unknown]
This commit is contained in:
@@ -28,7 +28,8 @@ pub trait Provider {
|
|||||||
) -> ProviderFuture<'a, Self::Stream>;
|
) -> ProviderFuture<'a, Self::Stream>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum ProviderKind {
|
pub enum ProviderKind {
|
||||||
Anthropic,
|
Anthropic,
|
||||||
Xai,
|
Xai,
|
||||||
@@ -49,6 +50,55 @@ pub struct ModelTokenLimit {
|
|||||||
pub context_window_tokens: u32,
|
pub context_window_tokens: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
|
pub enum ProviderWireProtocol {
|
||||||
|
AnthropicMessages,
|
||||||
|
OpenAiChatCompletions,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
|
pub enum ProviderFeatureSupport {
|
||||||
|
Supported,
|
||||||
|
Unsupported,
|
||||||
|
PassthroughAsTool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||||
|
pub struct ProviderCapabilityReport {
|
||||||
|
pub provider: ProviderKind,
|
||||||
|
pub wire_protocol: ProviderWireProtocol,
|
||||||
|
pub auth_env: &'static str,
|
||||||
|
pub base_url_env: &'static str,
|
||||||
|
pub default_base_url: &'static str,
|
||||||
|
pub tool_calls: ProviderFeatureSupport,
|
||||||
|
pub streaming: ProviderFeatureSupport,
|
||||||
|
pub streaming_usage: ProviderFeatureSupport,
|
||||||
|
pub prompt_cache: ProviderFeatureSupport,
|
||||||
|
pub custom_parameters: ProviderFeatureSupport,
|
||||||
|
pub reasoning_effort: ProviderFeatureSupport,
|
||||||
|
pub reasoning_content_history: ProviderFeatureSupport,
|
||||||
|
pub fixed_sampling_reasoning_models: ProviderFeatureSupport,
|
||||||
|
pub web_search: ProviderFeatureSupport,
|
||||||
|
pub web_fetch: ProviderFeatureSupport,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
|
pub enum ProviderDiagnosticSeverity {
|
||||||
|
Info,
|
||||||
|
Warning,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||||
|
pub struct ProviderDiagnostic {
|
||||||
|
pub code: &'static str,
|
||||||
|
pub severity: ProviderDiagnosticSeverity,
|
||||||
|
pub message: String,
|
||||||
|
pub action: String,
|
||||||
|
}
|
||||||
|
|
||||||
const MODEL_REGISTRY: &[(&str, ProviderMetadata)] = &[
|
const MODEL_REGISTRY: &[(&str, ProviderMetadata)] = &[
|
||||||
(
|
(
|
||||||
"opus",
|
"opus",
|
||||||
|
|||||||
Reference in New Issue
Block a user