fix(core): accept null context length from LM Studio models (#63198)

This commit is contained in:
Aiden Cline
2026-11-10 18:33:03 -06:00
committed by GitHub
Unverified
parent c4bf172532
commit 05b32ea324
2 changed files with 3 additions and 2 deletions
@@ -11,7 +11,8 @@ const RemoteModel = Schema.Struct({
config: Schema.Struct({ context_length: Schema.Int }),
}),
),
max_context_length: Schema.Int,
// Null for decision models whose context is unknown.
max_context_length: Schema.NullOr(Schema.Int),
capabilities: Schema.Struct({
vision: Schema.Boolean,
trained_for_tool_use: Schema.Boolean,
@@ -74,7 +74,7 @@ describe("LMStudioPlugin", () => {
key: "clef-flash",
display_name: "Clef Flash",
loaded_instances: [],
max_context_length: 262_144,
max_context_length: null,
},
],
}),