Release 0.2.0 #4

Merged
dguiducci merged 96 commits from main into release 2026-08-17 18:07:20 +01:00
3 changed files with 24 additions and 3 deletions
Showing only changes of commit 6b827e1b88 - Show all commits
+7 -1
View File
@@ -356,7 +356,13 @@ impl LlmManager {
pub async fn reasoning_mode_for(&self, provider_id: i64, model_id: &str) -> Option<ReasoningMode> {
let record = self.state.read().await.providers.get(&provider_id).cloned()?;
let provider = self.registry.get(&record.provider)?;
provider.reasoning_mode(model_id, &[])
// Capability-gated modes need the model's real capabilities: resolve
// them from the provider's catalog. Empty when unlisted — id-glob
// rules still match.
let caps = self.fetch_model_info(provider_id, model_id).await
.map(|m| m.capabilities)
.unwrap_or_default();
provider.reasoning_mode(model_id, &caps)
}
pub async fn list_models_info(&self) -> Vec<LlmModelInfo> {
@@ -588,6 +588,17 @@ impl ApiProvider for DeclaredProvider {
Ok(Some(self.list_models(record).await?))
}
async fn llm_model_info(
&self,
record: &LlmProviderRecord,
model_id: &str,
) -> Result<Option<RemoteLlmModelInfo>> {
if self.spec.models.is_none() {
return Ok(None);
}
Ok(self.list_models(record).await?.into_iter().find(|m| m.id == model_id))
}
fn reasoning_mode(&self, model_id: &str, capabilities: &[String]) -> Option<ReasoningMode> {
let spec = self.spec.reasoning.as_ref()?;
let rule = spec
+6 -2
View File
@@ -190,13 +190,17 @@ providers:
base_capabilities: [function_calling]
reasoning:
# Flat reasoning_effort (none/minimal/low/medium/high/xhigh/max);
# "none" disables reasoning where the model supports it. Models tagged
# `reasoning` but not `reasoning_effort` always think — no knob.
# "none" disables reasoning where the model supports it.
request: { kind: effort, remap: { disabled: none } }
modes:
- when: { capability: reasoning_effort }
values: [disabled, minimal, low, medium, high, xhigh, max]
default: high
# Models tagged only `reasoning` (R1, DeepSeek-V4-…) accept the plain
# levels — graded steps are a `reasoning_effort`-tag affair.
- when: { capability: reasoning }
values: [disabled, low, medium, high]
default: high
- id: lm_studio
name: "LM Studio"