pub enum ProviderOp {
List {
json: bool,
target: AuthTarget,
},
Add {Show 15 fields
name: String,
kind: String,
base_url: String,
model: Option<String>,
models: Vec<String>,
supported_clients: Vec<String>,
api_key: Option<String>,
api_key_stdin: bool,
api_key_env: Option<String>,
subscriber_id: Option<String>,
acknowledge_intermediary_risk: bool,
acknowledge_unsupported_client: Vec<String>,
enabled: bool,
if_absent: bool,
target: AuthTarget,
},
Show {
name: String,
json: bool,
target: AuthTarget,
},
Remove {
name: String,
target: AuthTarget,
},
Import {
path: PathBuf,
target: AuthTarget,
},
}Variants§
List
List configured upstream providers.
Add
Add or replace an API provider or policy-gated credential class.
create and issue are accepted too (issue #314).
Fields
name: StringName this provider is referred to by, in routing and in providers show. Adding an existing name replaces that record.
base_url: StringThe upstream’s own base URL — not the router’s. --server names
the router; this names the machine it forwards to (issue #314).
supported_clients: Vec<String>Canonical managed clients explicitly supported by this ordinary provider adapter. Repeat or comma-separate values.
api_key: Option<String>Vendor API key, stored encrypted under the deployment’s
TOKEN_SECRET.
Prefer --api-key-stdin: a key given here is visible in shell
history and in ps (issue #314).
api_key_stdin: boolRead the vendor API key as one line from standard input.
The one secret in this tool that could travel only through argv,
while every other has had a stdin form and clients setup --help
warns against argv for exactly this reason (issue #314).
api_key_env: Option<String>Environment variable the router process reads the key from at request time, instead of storing one.
acknowledge_intermediary_risk: boolAccept the documented account risk of intermediary personal proxying.
acknowledge_unsupported_client: Vec<String>Individually risk-accept a known tool not listed by z.ai.
enabled: boolWhether this provider takes part in routing. Disabled records are kept and ignored, so one can be parked without deleting it.
target: AuthTargetShow
Show one provider with secret material redacted.
Fields
json: boolAccepted for symmetry with list: show already emits JSON, so
this changes nothing (issue #314). A script should not have to know
which verb of a family takes the flag.
target: AuthTargetRemove
Remove one provider.
revoke and delete are accepted too (issue #314).
Import
Import providers from JSON, .lenv, or indented Links-style config.
Implementations§
Source§impl ProviderOp
impl ProviderOp
Sourcepub const fn target(&self) -> &AuthTarget
pub const fn target(&self) -> &AuthTarget
Which router this provider operation acts on.
Trait Implementations§
Source§impl Debug for ProviderOp
impl Debug for ProviderOp
Source§impl FromArgMatches for ProviderOp
impl FromArgMatches for ProviderOp
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ProviderOp
impl Subcommand for ProviderOp
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for ProviderOp
impl RefUnwindSafe for ProviderOp
impl Send for ProviderOp
impl Sync for ProviderOp
impl Unpin for ProviderOp
impl UnsafeUnpin for ProviderOp
impl UnwindSafe for ProviderOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more