Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
lmstudio: Fill max_tokens using the response from /models (#25606)
Elijah McMorris52fa7ababb7f
diff --git a/crates/language_models/src/provider/lmstudio.rs b/crates/language_models/src/provider/lmstudio.rsindex 6840f30fca8..a9129027d64 100644--- a/crates/language_models/src/provider/lmstudio.rs+++ b/crates/language_models/src/provider/lmstudio.rs@@ -84,7 +84,9 @@ impl State {lmstudio::Model::new(&model.id,None,- None,+ model+ .loaded_context_length+ .or_else(|| model.max_context_length),model.capabilities.supports_tool_calls(),)})diff --git a/crates/lmstudio/src/lmstudio.rs b/crates/lmstudio/src/lmstudio.rsindex 1c4a902b93d..b62909fe315 100644--- a/crates/lmstudio/src/lmstudio.rs+++ b/crates/lmstudio/src/lmstudio.rs@@ -243,8 +243,8 @@ pub struct ModelEntry {pub compatibility_type: CompatibilityType,pub quantization: Option<String>,pub state: ModelState,- pub max_context_length: Option<u32>,- pub loaded_context_length: Option<u32>,+ pub max_context_length: Option<usize>,+ pub loaded_context_length: Option<usize>,#[serde(default)]pub capabilities: Capabilities,}