diff --git a/docs/protocol/draft/schema-v2.mdx b/docs/protocol/draft/schema-v2.mdx index e84a9dc9..fc6f502c 100644 --- a/docs/protocol/draft/schema-v2.mdx +++ b/docs/protocol/draft/schema-v2.mdx @@ -726,7 +726,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Disables a provider. -#### DisableProvidersRequest +#### DisableProviderRequest **UNSTABLE** @@ -750,7 +750,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte Provider id to disable. -#### DisableProvidersResponse +#### DisableProviderResponse **UNSTABLE** @@ -834,7 +834,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Replaces the configuration for a provider. -#### SetProvidersRequest +#### SetProviderRequest **UNSTABLE** @@ -870,7 +870,7 @@ May include authorization, routing, or other integration-specific headers. Provider id to configure. -#### SetProvidersResponse +#### SetProviderResponse **UNSTABLE** diff --git a/docs/protocol/draft/schema.mdx b/docs/protocol/draft/schema.mdx index e84a9dc9..fc6f502c 100644 --- a/docs/protocol/draft/schema.mdx +++ b/docs/protocol/draft/schema.mdx @@ -726,7 +726,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Disables a provider. -#### DisableProvidersRequest +#### DisableProviderRequest **UNSTABLE** @@ -750,7 +750,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte Provider id to disable. -#### DisableProvidersResponse +#### DisableProviderResponse **UNSTABLE** @@ -834,7 +834,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Replaces the configuration for a provider. -#### SetProvidersRequest +#### SetProviderRequest **UNSTABLE** @@ -870,7 +870,7 @@ May include authorization, routing, or other integration-specific headers. Provider id to configure. -#### SetProvidersResponse +#### SetProviderResponse **UNSTABLE** diff --git a/docs/rfds/custom-llm-endpoint.mdx b/docs/rfds/custom-llm-endpoint.mdx index 275e569d..222824c7 100644 --- a/docs/rfds/custom-llm-endpoint.mdx +++ b/docs/rfds/custom-llm-endpoint.mdx @@ -174,7 +174,7 @@ interface ProvidersListResponse { `providers/set` updates the full configuration for one provider id. ```typescript -interface ProvidersSetRequest { +interface SetProviderRequest { /** Provider id to configure. */ id: string; @@ -195,7 +195,7 @@ interface ProvidersSetRequest { _meta?: Record; } -interface ProvidersSetResponse { +interface SetProviderResponse { /** Extension metadata */ _meta?: Record; } @@ -204,7 +204,7 @@ interface ProvidersSetResponse { ### `providers/disable` ```typescript -interface ProvidersDisableRequest { +interface DisableProviderRequest { /** Provider id to disable. */ id: string; @@ -212,7 +212,7 @@ interface ProvidersDisableRequest { _meta?: Record; } -interface ProvidersDisableResponse { +interface DisableProviderResponse { /** Extension metadata */ _meta?: Record; } diff --git a/schema/schema.unstable.json b/schema/schema.unstable.json index ae15000a..d88d9b55 100644 --- a/schema/schema.unstable.json +++ b/schema/schema.unstable.json @@ -376,18 +376,18 @@ { "allOf": [ { - "$ref": "#/$defs/SetProvidersResponse" + "$ref": "#/$defs/SetProviderResponse" } ], - "title": "SetProvidersResponse" + "title": "SetProviderResponse" }, { "allOf": [ { - "$ref": "#/$defs/DisableProvidersResponse" + "$ref": "#/$defs/DisableProviderResponse" } ], - "title": "DisableProvidersResponse" + "title": "DisableProviderResponse" }, { "allOf": [ @@ -1234,20 +1234,20 @@ { "allOf": [ { - "$ref": "#/$defs/SetProvidersRequest" + "$ref": "#/$defs/SetProviderRequest" } ], "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReplaces the configuration for a provider.", - "title": "SetProvidersRequest" + "title": "SetProviderRequest" }, { "allOf": [ { - "$ref": "#/$defs/DisableProvidersRequest" + "$ref": "#/$defs/DisableProviderRequest" } ], "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDisables a provider.", - "title": "DisableProvidersRequest" + "title": "DisableProviderRequest" }, { "allOf": [ @@ -2289,7 +2289,7 @@ "required": ["path", "newText"], "type": "object" }, - "DisableProvidersRequest": { + "DisableProviderRequest": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/disable`.", "properties": { "_meta": { @@ -2307,7 +2307,7 @@ "x-method": "providers/disable", "x-side": "agent" }, - "DisableProvidersResponse": { + "DisableProviderResponse": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/disable`.", "properties": { "_meta": { @@ -6382,7 +6382,7 @@ } ] }, - "SetProvidersRequest": { + "SetProviderRequest": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/set`.\n\nReplaces the full configuration for one provider id.", "properties": { "_meta": { @@ -6419,7 +6419,7 @@ "x-method": "providers/set", "x-side": "agent" }, - "SetProvidersResponse": { + "SetProviderResponse": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/set`.", "properties": { "_meta": { diff --git a/schema/schema.v2.unstable.json b/schema/schema.v2.unstable.json index ae15000a..d88d9b55 100644 --- a/schema/schema.v2.unstable.json +++ b/schema/schema.v2.unstable.json @@ -376,18 +376,18 @@ { "allOf": [ { - "$ref": "#/$defs/SetProvidersResponse" + "$ref": "#/$defs/SetProviderResponse" } ], - "title": "SetProvidersResponse" + "title": "SetProviderResponse" }, { "allOf": [ { - "$ref": "#/$defs/DisableProvidersResponse" + "$ref": "#/$defs/DisableProviderResponse" } ], - "title": "DisableProvidersResponse" + "title": "DisableProviderResponse" }, { "allOf": [ @@ -1234,20 +1234,20 @@ { "allOf": [ { - "$ref": "#/$defs/SetProvidersRequest" + "$ref": "#/$defs/SetProviderRequest" } ], "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReplaces the configuration for a provider.", - "title": "SetProvidersRequest" + "title": "SetProviderRequest" }, { "allOf": [ { - "$ref": "#/$defs/DisableProvidersRequest" + "$ref": "#/$defs/DisableProviderRequest" } ], "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDisables a provider.", - "title": "DisableProvidersRequest" + "title": "DisableProviderRequest" }, { "allOf": [ @@ -2289,7 +2289,7 @@ "required": ["path", "newText"], "type": "object" }, - "DisableProvidersRequest": { + "DisableProviderRequest": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/disable`.", "properties": { "_meta": { @@ -2307,7 +2307,7 @@ "x-method": "providers/disable", "x-side": "agent" }, - "DisableProvidersResponse": { + "DisableProviderResponse": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/disable`.", "properties": { "_meta": { @@ -6382,7 +6382,7 @@ } ] }, - "SetProvidersRequest": { + "SetProviderRequest": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/set`.\n\nReplaces the full configuration for one provider id.", "properties": { "_meta": { @@ -6419,7 +6419,7 @@ "x-method": "providers/set", "x-side": "agent" }, - "SetProvidersResponse": { + "SetProviderResponse": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/set`.", "properties": { "_meta": { diff --git a/src/bin/generate.rs b/src/bin/generate.rs index 3155f641..a68085f4 100644 --- a/src/bin/generate.rs +++ b/src/bin/generate.rs @@ -1170,8 +1170,8 @@ starting with '$/' it is free to ignore the notification." "initialize" => self.agent.get("InitializeRequest").unwrap(), "authenticate" => self.agent.get("AuthenticateRequest").unwrap(), "providers/list" => self.agent.get("ListProvidersRequest").unwrap(), - "providers/set" => self.agent.get("SetProvidersRequest").unwrap(), - "providers/disable" => self.agent.get("DisableProvidersRequest").unwrap(), + "providers/set" => self.agent.get("SetProviderRequest").unwrap(), + "providers/disable" => self.agent.get("DisableProviderRequest").unwrap(), "session/new" => self.agent.get("NewSessionRequest").unwrap(), "session/load" => self.agent.get("LoadSessionRequest").unwrap(), "session/list" => self.agent.get("ListSessionsRequest").unwrap(), diff --git a/src/v1/agent.rs b/src/v1/agent.rs index f824cfa2..a52cb95c 100644 --- a/src/v1/agent.rs +++ b/src/v1/agent.rs @@ -3814,7 +3814,7 @@ impl ListProvidersResponse { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_SET_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct SetProvidersRequest { +pub struct SetProviderRequest { /// Provider id to configure. pub id: String, /// Protocol type for this provider. @@ -3835,7 +3835,7 @@ pub struct SetProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl SetProvidersRequest { +impl SetProviderRequest { #[must_use] pub fn new(id: impl Into, api_type: LlmProtocol, base_url: impl Into) -> Self { Self { @@ -3878,7 +3878,7 @@ impl SetProvidersRequest { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_SET_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct SetProvidersResponse { +pub struct SetProviderResponse { /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at /// these keys. @@ -3889,7 +3889,7 @@ pub struct SetProvidersResponse { } #[cfg(feature = "unstable_llm_providers")] -impl SetProvidersResponse { +impl SetProviderResponse { #[must_use] pub fn new() -> Self { Self::default() @@ -3918,7 +3918,7 @@ impl SetProvidersResponse { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_DISABLE_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct DisableProvidersRequest { +pub struct DisableProviderRequest { /// Provider id to disable. pub id: String, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3931,7 +3931,7 @@ pub struct DisableProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl DisableProvidersRequest { +impl DisableProviderRequest { #[must_use] pub fn new(id: impl Into) -> Self { Self { @@ -3963,7 +3963,7 @@ impl DisableProvidersRequest { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_DISABLE_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct DisableProvidersResponse { +pub struct DisableProviderResponse { /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at /// these keys. @@ -3974,7 +3974,7 @@ pub struct DisableProvidersResponse { } #[cfg(feature = "unstable_llm_providers")] -impl DisableProvidersResponse { +impl DisableProviderResponse { #[must_use] pub fn new() -> Self { Self::default() @@ -4952,14 +4952,14 @@ pub enum ClientRequest { /// /// Replaces the configuration for a provider. #[cfg(feature = "unstable_llm_providers")] - SetProvidersRequest(SetProvidersRequest), + SetProviderRequest(SetProviderRequest), /// **UNSTABLE** /// /// This capability is not part of the spec yet, and may be removed or changed at any point. /// /// Disables a provider. #[cfg(feature = "unstable_llm_providers")] - DisableProvidersRequest(DisableProvidersRequest), + DisableProviderRequest(DisableProviderRequest), /// **UNSTABLE** /// /// This capability is not part of the spec yet, and may be removed or changed at any point. @@ -5121,9 +5121,9 @@ impl ClientRequest { #[cfg(feature = "unstable_llm_providers")] Self::ListProvidersRequest(_) => AGENT_METHOD_NAMES.providers_list, #[cfg(feature = "unstable_llm_providers")] - Self::SetProvidersRequest(_) => AGENT_METHOD_NAMES.providers_set, + Self::SetProviderRequest(_) => AGENT_METHOD_NAMES.providers_set, #[cfg(feature = "unstable_llm_providers")] - Self::DisableProvidersRequest(_) => AGENT_METHOD_NAMES.providers_disable, + Self::DisableProviderRequest(_) => AGENT_METHOD_NAMES.providers_disable, #[cfg(feature = "unstable_logout")] Self::LogoutRequest(_) => AGENT_METHOD_NAMES.logout, Self::NewSessionRequest(_) => AGENT_METHOD_NAMES.session_new, @@ -5170,9 +5170,9 @@ pub enum AgentResponse { #[cfg(feature = "unstable_llm_providers")] ListProvidersResponse(ListProvidersResponse), #[cfg(feature = "unstable_llm_providers")] - SetProvidersResponse(#[serde(default)] SetProvidersResponse), + SetProviderResponse(#[serde(default)] SetProviderResponse), #[cfg(feature = "unstable_llm_providers")] - DisableProvidersResponse(#[serde(default)] DisableProvidersResponse), + DisableProviderResponse(#[serde(default)] DisableProviderResponse), #[cfg(feature = "unstable_logout")] LogoutResponse(#[serde(default)] LogoutResponse), NewSessionResponse(NewSessionResponse), @@ -6429,14 +6429,14 @@ mod test_serialization { #[cfg(feature = "unstable_llm_providers")] #[test] - fn test_set_providers_request_serialization() { + fn test_set_provider_request_serialization() { use std::collections::HashMap; let mut headers = HashMap::new(); headers.insert("Authorization".to_string(), "Bearer sk-test".to_string()); let request = - SetProvidersRequest::new("main", LlmProtocol::OpenAi, "https://api.openai.com/v1") + SetProviderRequest::new("main", LlmProtocol::OpenAi, "https://api.openai.com/v1") .headers(headers); let json = serde_json::to_value(&request).unwrap(); @@ -6452,7 +6452,7 @@ mod test_serialization { }) ); - let deserialized: SetProvidersRequest = serde_json::from_value(json).unwrap(); + let deserialized: SetProviderRequest = serde_json::from_value(json).unwrap(); assert_eq!(deserialized.id, "main"); assert_eq!(deserialized.api_type, LlmProtocol::OpenAi); assert_eq!(deserialized.base_url, "https://api.openai.com/v1"); @@ -6465,9 +6465,9 @@ mod test_serialization { #[cfg(feature = "unstable_llm_providers")] #[test] - fn test_set_providers_request_omits_empty_headers() { + fn test_set_provider_request_omits_empty_headers() { let request = - SetProvidersRequest::new("main", LlmProtocol::Anthropic, "https://api.anthropic.com"); + SetProviderRequest::new("main", LlmProtocol::Anthropic, "https://api.anthropic.com"); let json = serde_json::to_value(&request).unwrap(); // headers should be omitted when empty @@ -6476,13 +6476,13 @@ mod test_serialization { #[cfg(feature = "unstable_llm_providers")] #[test] - fn test_disable_providers_request_serialization() { - let request = DisableProvidersRequest::new("secondary"); + fn test_disable_provider_request_serialization() { + let request = DisableProviderRequest::new("secondary"); let json = serde_json::to_value(&request).unwrap(); assert_eq!(json, json!({ "id": "secondary" })); - let deserialized: DisableProvidersRequest = serde_json::from_value(json).unwrap(); + let deserialized: DisableProviderRequest = serde_json::from_value(json).unwrap(); assert_eq!(deserialized.id, "secondary"); } diff --git a/src/v2/agent.rs b/src/v2/agent.rs index a915111e..1096410a 100644 --- a/src/v2/agent.rs +++ b/src/v2/agent.rs @@ -3814,7 +3814,7 @@ impl ListProvidersResponse { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_SET_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct SetProvidersRequest { +pub struct SetProviderRequest { /// Provider id to configure. pub id: String, /// Protocol type for this provider. @@ -3835,7 +3835,7 @@ pub struct SetProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl SetProvidersRequest { +impl SetProviderRequest { #[must_use] pub fn new(id: impl Into, api_type: LlmProtocol, base_url: impl Into) -> Self { Self { @@ -3878,7 +3878,7 @@ impl SetProvidersRequest { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_SET_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct SetProvidersResponse { +pub struct SetProviderResponse { /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at /// these keys. @@ -3889,7 +3889,7 @@ pub struct SetProvidersResponse { } #[cfg(feature = "unstable_llm_providers")] -impl SetProvidersResponse { +impl SetProviderResponse { #[must_use] pub fn new() -> Self { Self::default() @@ -3918,7 +3918,7 @@ impl SetProvidersResponse { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_DISABLE_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct DisableProvidersRequest { +pub struct DisableProviderRequest { /// Provider id to disable. pub id: String, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3931,7 +3931,7 @@ pub struct DisableProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl DisableProvidersRequest { +impl DisableProviderRequest { #[must_use] pub fn new(id: impl Into) -> Self { Self { @@ -3963,7 +3963,7 @@ impl DisableProvidersRequest { #[schemars(extend("x-side" = "agent", "x-method" = PROVIDERS_DISABLE_METHOD_NAME))] #[serde(rename_all = "camelCase")] #[non_exhaustive] -pub struct DisableProvidersResponse { +pub struct DisableProviderResponse { /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at /// these keys. @@ -3974,7 +3974,7 @@ pub struct DisableProvidersResponse { } #[cfg(feature = "unstable_llm_providers")] -impl DisableProvidersResponse { +impl DisableProviderResponse { #[must_use] pub fn new() -> Self { Self::default() @@ -4952,14 +4952,14 @@ pub enum ClientRequest { /// /// Replaces the configuration for a provider. #[cfg(feature = "unstable_llm_providers")] - SetProvidersRequest(SetProvidersRequest), + SetProviderRequest(SetProviderRequest), /// **UNSTABLE** /// /// This capability is not part of the spec yet, and may be removed or changed at any point. /// /// Disables a provider. #[cfg(feature = "unstable_llm_providers")] - DisableProvidersRequest(DisableProvidersRequest), + DisableProviderRequest(DisableProviderRequest), /// **UNSTABLE** /// /// This capability is not part of the spec yet, and may be removed or changed at any point. @@ -5121,9 +5121,9 @@ impl ClientRequest { #[cfg(feature = "unstable_llm_providers")] Self::ListProvidersRequest(_) => AGENT_METHOD_NAMES.providers_list, #[cfg(feature = "unstable_llm_providers")] - Self::SetProvidersRequest(_) => AGENT_METHOD_NAMES.providers_set, + Self::SetProviderRequest(_) => AGENT_METHOD_NAMES.providers_set, #[cfg(feature = "unstable_llm_providers")] - Self::DisableProvidersRequest(_) => AGENT_METHOD_NAMES.providers_disable, + Self::DisableProviderRequest(_) => AGENT_METHOD_NAMES.providers_disable, #[cfg(feature = "unstable_logout")] Self::LogoutRequest(_) => AGENT_METHOD_NAMES.logout, Self::NewSessionRequest(_) => AGENT_METHOD_NAMES.session_new, @@ -5170,9 +5170,9 @@ pub enum AgentResponse { #[cfg(feature = "unstable_llm_providers")] ListProvidersResponse(ListProvidersResponse), #[cfg(feature = "unstable_llm_providers")] - SetProvidersResponse(#[serde(default)] SetProvidersResponse), + SetProviderResponse(#[serde(default)] SetProviderResponse), #[cfg(feature = "unstable_llm_providers")] - DisableProvidersResponse(#[serde(default)] DisableProvidersResponse), + DisableProviderResponse(#[serde(default)] DisableProviderResponse), #[cfg(feature = "unstable_logout")] LogoutResponse(#[serde(default)] LogoutResponse), NewSessionResponse(NewSessionResponse), @@ -6351,14 +6351,14 @@ mod test_serialization { #[cfg(feature = "unstable_llm_providers")] #[test] - fn test_set_providers_request_serialization() { + fn test_set_provider_request_serialization() { use std::collections::HashMap; let mut headers = HashMap::new(); headers.insert("Authorization".to_string(), "Bearer sk-test".to_string()); let request = - SetProvidersRequest::new("main", LlmProtocol::OpenAi, "https://api.openai.com/v1") + SetProviderRequest::new("main", LlmProtocol::OpenAi, "https://api.openai.com/v1") .headers(headers); let json = serde_json::to_value(&request).unwrap(); @@ -6374,7 +6374,7 @@ mod test_serialization { }) ); - let deserialized: SetProvidersRequest = serde_json::from_value(json).unwrap(); + let deserialized: SetProviderRequest = serde_json::from_value(json).unwrap(); assert_eq!(deserialized.id, "main"); assert_eq!(deserialized.api_type, LlmProtocol::OpenAi); assert_eq!(deserialized.base_url, "https://api.openai.com/v1"); @@ -6387,9 +6387,9 @@ mod test_serialization { #[cfg(feature = "unstable_llm_providers")] #[test] - fn test_set_providers_request_omits_empty_headers() { + fn test_set_provider_request_omits_empty_headers() { let request = - SetProvidersRequest::new("main", LlmProtocol::Anthropic, "https://api.anthropic.com"); + SetProviderRequest::new("main", LlmProtocol::Anthropic, "https://api.anthropic.com"); let json = serde_json::to_value(&request).unwrap(); // headers should be omitted when empty @@ -6398,13 +6398,13 @@ mod test_serialization { #[cfg(feature = "unstable_llm_providers")] #[test] - fn test_disable_providers_request_serialization() { - let request = DisableProvidersRequest::new("secondary"); + fn test_disable_provider_request_serialization() { + let request = DisableProviderRequest::new("secondary"); let json = serde_json::to_value(&request).unwrap(); assert_eq!(json, json!({ "id": "secondary" })); - let deserialized: DisableProvidersRequest = serde_json::from_value(json).unwrap(); + let deserialized: DisableProviderRequest = serde_json::from_value(json).unwrap(); assert_eq!(deserialized.id, "secondary"); } diff --git a/src/v2/conversion.rs b/src/v2/conversion.rs index 033da1da..f1c31102 100644 --- a/src/v2/conversion.rs +++ b/src/v2/conversion.rs @@ -5083,8 +5083,8 @@ impl IntoV2 for crate::v1::ListProvidersResponse { } #[cfg(feature = "unstable_llm_providers")] -impl IntoV1 for super::SetProvidersRequest { - type Output = crate::v1::SetProvidersRequest; +impl IntoV1 for super::SetProviderRequest { + type Output = crate::v1::SetProviderRequest; fn into_v1(self) -> Result { let Self { @@ -5094,7 +5094,7 @@ impl IntoV1 for super::SetProvidersRequest { headers, meta, } = self; - Ok(crate::v1::SetProvidersRequest { + Ok(crate::v1::SetProviderRequest { id: id.into_v1()?, api_type: api_type.into_v1()?, base_url: base_url.into_v1()?, @@ -5105,8 +5105,8 @@ impl IntoV1 for super::SetProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl IntoV2 for crate::v1::SetProvidersRequest { - type Output = super::SetProvidersRequest; +impl IntoV2 for crate::v1::SetProviderRequest { + type Output = super::SetProviderRequest; fn into_v2(self) -> Result { let Self { @@ -5116,7 +5116,7 @@ impl IntoV2 for crate::v1::SetProvidersRequest { headers, meta, } = self; - Ok(super::SetProvidersRequest { + Ok(super::SetProviderRequest { id: id.into_v2()?, api_type: api_type.into_v2()?, base_url: base_url.into_v2()?, @@ -5127,36 +5127,36 @@ impl IntoV2 for crate::v1::SetProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl IntoV1 for super::SetProvidersResponse { - type Output = crate::v1::SetProvidersResponse; +impl IntoV1 for super::SetProviderResponse { + type Output = crate::v1::SetProviderResponse; fn into_v1(self) -> Result { let Self { meta } = self; - Ok(crate::v1::SetProvidersResponse { + Ok(crate::v1::SetProviderResponse { meta: meta.into_v1()?, }) } } #[cfg(feature = "unstable_llm_providers")] -impl IntoV2 for crate::v1::SetProvidersResponse { - type Output = super::SetProvidersResponse; +impl IntoV2 for crate::v1::SetProviderResponse { + type Output = super::SetProviderResponse; fn into_v2(self) -> Result { let Self { meta } = self; - Ok(super::SetProvidersResponse { + Ok(super::SetProviderResponse { meta: meta.into_v2()?, }) } } #[cfg(feature = "unstable_llm_providers")] -impl IntoV1 for super::DisableProvidersRequest { - type Output = crate::v1::DisableProvidersRequest; +impl IntoV1 for super::DisableProviderRequest { + type Output = crate::v1::DisableProviderRequest; fn into_v1(self) -> Result { let Self { id, meta } = self; - Ok(crate::v1::DisableProvidersRequest { + Ok(crate::v1::DisableProviderRequest { id: id.into_v1()?, meta: meta.into_v1()?, }) @@ -5164,12 +5164,12 @@ impl IntoV1 for super::DisableProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl IntoV2 for crate::v1::DisableProvidersRequest { - type Output = super::DisableProvidersRequest; +impl IntoV2 for crate::v1::DisableProviderRequest { + type Output = super::DisableProviderRequest; fn into_v2(self) -> Result { let Self { id, meta } = self; - Ok(super::DisableProvidersRequest { + Ok(super::DisableProviderRequest { id: id.into_v2()?, meta: meta.into_v2()?, }) @@ -5177,24 +5177,24 @@ impl IntoV2 for crate::v1::DisableProvidersRequest { } #[cfg(feature = "unstable_llm_providers")] -impl IntoV1 for super::DisableProvidersResponse { - type Output = crate::v1::DisableProvidersResponse; +impl IntoV1 for super::DisableProviderResponse { + type Output = crate::v1::DisableProviderResponse; fn into_v1(self) -> Result { let Self { meta } = self; - Ok(crate::v1::DisableProvidersResponse { + Ok(crate::v1::DisableProviderResponse { meta: meta.into_v1()?, }) } } #[cfg(feature = "unstable_llm_providers")] -impl IntoV2 for crate::v1::DisableProvidersResponse { - type Output = super::DisableProvidersResponse; +impl IntoV2 for crate::v1::DisableProviderResponse { + type Output = super::DisableProviderResponse; fn into_v2(self) -> Result { let Self { meta } = self; - Ok(super::DisableProvidersResponse { + Ok(super::DisableProviderResponse { meta: meta.into_v2()?, }) } @@ -5594,12 +5594,12 @@ impl IntoV1 for super::ClientRequest { crate::v1::ClientRequest::ListProvidersRequest(value.into_v1()?) } #[cfg(feature = "unstable_llm_providers")] - Self::SetProvidersRequest(value) => { - crate::v1::ClientRequest::SetProvidersRequest(value.into_v1()?) + Self::SetProviderRequest(value) => { + crate::v1::ClientRequest::SetProviderRequest(value.into_v1()?) } #[cfg(feature = "unstable_llm_providers")] - Self::DisableProvidersRequest(value) => { - crate::v1::ClientRequest::DisableProvidersRequest(value.into_v1()?) + Self::DisableProviderRequest(value) => { + crate::v1::ClientRequest::DisableProviderRequest(value.into_v1()?) } #[cfg(feature = "unstable_logout")] Self::LogoutRequest(value) => crate::v1::ClientRequest::LogoutRequest(value.into_v1()?), @@ -5676,12 +5676,12 @@ impl IntoV2 for crate::v1::ClientRequest { super::ClientRequest::ListProvidersRequest(value.into_v2()?) } #[cfg(feature = "unstable_llm_providers")] - Self::SetProvidersRequest(value) => { - super::ClientRequest::SetProvidersRequest(value.into_v2()?) + Self::SetProviderRequest(value) => { + super::ClientRequest::SetProviderRequest(value.into_v2()?) } #[cfg(feature = "unstable_llm_providers")] - Self::DisableProvidersRequest(value) => { - super::ClientRequest::DisableProvidersRequest(value.into_v2()?) + Self::DisableProviderRequest(value) => { + super::ClientRequest::DisableProviderRequest(value.into_v2()?) } #[cfg(feature = "unstable_logout")] Self::LogoutRequest(value) => super::ClientRequest::LogoutRequest(value.into_v2()?), @@ -5754,12 +5754,12 @@ impl IntoV1 for super::AgentResponse { crate::v1::AgentResponse::ListProvidersResponse(value.into_v1()?) } #[cfg(feature = "unstable_llm_providers")] - Self::SetProvidersResponse(value) => { - crate::v1::AgentResponse::SetProvidersResponse(value.into_v1()?) + Self::SetProviderResponse(value) => { + crate::v1::AgentResponse::SetProviderResponse(value.into_v1()?) } #[cfg(feature = "unstable_llm_providers")] - Self::DisableProvidersResponse(value) => { - crate::v1::AgentResponse::DisableProvidersResponse(value.into_v1()?) + Self::DisableProviderResponse(value) => { + crate::v1::AgentResponse::DisableProviderResponse(value.into_v1()?) } #[cfg(feature = "unstable_logout")] Self::LogoutResponse(value) => { @@ -5840,12 +5840,12 @@ impl IntoV2 for crate::v1::AgentResponse { super::AgentResponse::ListProvidersResponse(value.into_v2()?) } #[cfg(feature = "unstable_llm_providers")] - Self::SetProvidersResponse(value) => { - super::AgentResponse::SetProvidersResponse(value.into_v2()?) + Self::SetProviderResponse(value) => { + super::AgentResponse::SetProviderResponse(value.into_v2()?) } #[cfg(feature = "unstable_llm_providers")] - Self::DisableProvidersResponse(value) => { - super::AgentResponse::DisableProvidersResponse(value.into_v2()?) + Self::DisableProviderResponse(value) => { + super::AgentResponse::DisableProviderResponse(value.into_v2()?) } #[cfg(feature = "unstable_logout")] Self::LogoutResponse(value) => super::AgentResponse::LogoutResponse(value.into_v2()?),