Skip to main content

ChannelModelPickerRequest

Struct ChannelModelPickerRequest 

pub struct ChannelModelPickerRequest {
    pub requesting_user: String,
    pub requesting_user_id: String,
    pub reply_target: String,
    pub thread_ts: Option<String>,
    pub channel_alias: String,
    pub owner_agent_alias: String,
    pub current_model_provider: String,
    pub current_model: String,
    pub model_routes: Vec<ChannelModelPickerRoute>,
}
Expand description

Runtime-owned state needed by a channel to present its native model picker.

The picker is presentation only: a selected option must re-enter the channel runtime through the existing /model <ref> command path so model resolution and session scoping keep a single owner.

Fields§

§requesting_user: String

Human-readable display name of the user who sent /model, for rendering only. Never use this for authorization; that is requesting_user_id’s role.

§requesting_user_id: String

Immutable platform identity of the requesting user, used to authorize picker interactions (only this user may drive the picker) and to bind the selection back to the sender. Channels may decline to present a picker (return Ok(false)) when this is empty.

§reply_target: String

Reply scope inherited from the triggering message. The picker must be delivered to this target so it lands in the same chat the command was issued in.

§thread_ts: Option<String>

Thread/topic scope inherited from the triggering message. When Some, the picker and any follow-up selection must stay in the same thread or topic; when None, the channel’s default scope applies.

§channel_alias: String

Alias of the channel instance that received the command. A channel must decline requests whose alias is not its own (return Ok(false)).

§owner_agent_alias: String

Alias of the agent that owns this runtime. Implementations that render agent-owned picker state must decline (return Ok(false)) on mismatch.

§current_model_provider: String

Provider ref of the currently selected route, shown as the picker’s starting state.

§current_model: String

Model of the currently selected route, shown as the picker’s starting state.

§model_routes: Vec<ChannelModelPickerRoute>

Restart-scoped route snapshot used by the channel runtime to resolve /model <ref>. This is an in-memory view of the routes loaded at startup, not durable configuration; native pickers must not offer routes outside this set.

Trait Implementations§

Source§

impl Clone for ChannelModelPickerRequest

Source§

fn clone(&self) -> ChannelModelPickerRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ChannelModelPickerRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ChannelModelPickerRequest

Source§

impl PartialEq for ChannelModelPickerRequest

Source§

fn eq(&self, other: &ChannelModelPickerRequest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · §

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ChannelModelPickerRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.