pub struct CodingModelRoleConfig { /* private fields */ }Expand description
A provider-neutral model/provider pair for one non-primary runtime role.
Provider adapters are represented by the Merry-owned ModelProvider trait;
provider wire request and response types never cross this contract.
Implementations§
Source§impl CodingModelRoleConfig
impl CodingModelRoleConfig
Sourcepub fn new(
role: RuntimeModelRole,
provider: Arc<dyn ModelProvider>,
model: ModelName,
) -> Result<Self, CodingModelRoleConfigError>
pub fn new( role: RuntimeModelRole, provider: Arc<dyn ModelProvider>, model: ModelName, ) -> Result<Self, CodingModelRoleConfigError>
Creates a role-specific model configuration.
Sourcepub fn with_reasoning_effort(
self,
reasoning_effort: Option<ReasoningEffort>,
) -> Self
pub fn with_reasoning_effort( self, reasoning_effort: Option<ReasoningEffort>, ) -> Self
Sets an optional reasoning-effort override for this runtime model role.
Sourcepub const fn role(&self) -> RuntimeModelRole
pub const fn role(&self) -> RuntimeModelRole
Returns the runtime role receiving this provider/model pair.
Sourcepub fn provider(&self) -> Arc<dyn ModelProvider> ⓘ
pub fn provider(&self) -> Arc<dyn ModelProvider> ⓘ
Returns the provider handle for this role.
Sourcepub fn reasoning_effort(&self) -> Option<&ReasoningEffort>
pub fn reasoning_effort(&self) -> Option<&ReasoningEffort>
Returns the optional reasoning-effort override for this role.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CodingModelRoleConfig
impl !UnwindSafe for CodingModelRoleConfig
impl Forget for CodingModelRoleConfig
impl Freeze for CodingModelRoleConfigwhere
*const ArcInner<dyn ModelProvider> is !null: Freeze,
PhantomData<ArcInner<dyn ModelProvider>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for CodingModelRoleConfig
impl Send for CodingModelRoleConfig
impl Sync for CodingModelRoleConfig
impl Unpin for CodingModelRoleConfig
impl UnsafeUnpin for CodingModelRoleConfigwhere
*const ArcInner<dyn ModelProvider> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ModelProvider>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more