Commit Graph

14 Commits

Author SHA1 Message Date
Peter Steinberger b883b88129 fix(lmstudio): preserve valid models in mixed catalogs (#115336) 2026-07-28 20:43:16 -04:00
Wynne668 1573c78f5b fix(lmstudio): cancel model discovery response body on non-ok (#109718)
* fix(lmstudio): cancel model discovery response body on non-ok

Wire the direct-fetch release hook to cancel unread bodies so failed
model discovery releases the TCP connection instead of leaving it open.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(lmstudio): unify response cleanup

Co-authored-by: Zeng Wen <27948732+ZengWen-DT@users.noreply.github.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Zeng Wen <27948732+ZengWen-DT@users.noreply.github.com>
2026-07-17 01:12:23 -07:00
Alix-007 7844b08445 fix(lmstudio): bound model load success response body to prevent OOM (#96042)
The /api/v1/models/load success path read the response with an unbounded
await response.json(), so a misbehaving or compromised LM Studio server
could stream an arbitrarily large JSON body that is fully buffered into
memory before any size check. Read it through the shared byte-capped
readProviderJsonResponse helper instead (16 MiB provider-JSON cap, cancels
the stream on overflow, wraps malformed JSON), matching the discovery path
and the already-bounded error body.

Migrate the model fetch/load test mocks to real Response objects (the
bounded readers need a real body stream) and add a regression test that
streams an oversized success body and asserts a bounded error plus stream
cancellation.

Label: security
2026-06-24 09:03:02 -04:00
Ted Li 405896a4a3 fix(lmstudio): canonicalize variant model keys (#95401)
* fix(lmstudio): canonicalize variant model keys

* fix(lmstudio): retain canonical key after preload failures

* fix(lmstudio): keep canonical key during preload cooldown
2026-06-22 17:20:54 +00:00
Vincent Koc aff6e221a7 fix(lmstudio): bound model load error bodies 2026-06-19 20:43:17 +02:00
Peter Steinberger 4fa5092cdc docs: document small extension sources 2026-06-04 21:02:07 -04:00
Peter Steinberger a0c1f5962d fix(runtime): centralize safe timer timeout resolution 2026-05-29 15:36:38 -04:00
Peter Steinberger 11e82bdef2 fix(lmstudio): cap model fetch timeout delays 2026-05-29 15:05:20 -04:00
Peter Steinberger 80f7e36ddc fix: validate lmstudio discovered context lengths 2026-05-28 18:10:55 -04:00
Vincent Koc bc81d243ba fix(providers): harden model catalog response schemas 2026-05-16 12:16:42 +08:00
Vincent Koc 6e191f0e1e fix(lmstudio): wrap malformed model json 2026-05-15 08:27:55 +08:00
Peter Steinberger 1cac6f48f0 refactor: trim lmstudio helper exports 2026-05-01 20:06:53 +01:00
Peter Steinberger 252c63429e fix(providers): map native reasoning efforts 2026-04-27 13:27:58 +01:00
Rugved Somwanshi 0cfb83edfa feat: LM Studio Integration (#53248)
* Feat: LM Studio Integration

* Format

* Support usage in streaming true

Fix token count

* Add custom window check

* Drop max tokens fallback

* tweak docs

Update generated

* Avoid error if stale header does not resolve

* Fix test

* Fix test

* Fix rebase issues

Trim code

* Fix tests

Drop keyless

Fixes

* Fix linter issues in tests

* Update generated artifacts

* Do not have fatal header resoltuion for discovery

* Do the same for API key as well

* fix: honor lmstudio preload runtime auth

* fix: clear stale lmstudio header auth

* fix: lazy-load lmstudio runtime facade

* fix: preserve lmstudio shared synthetic auth

* fix: clear stale lmstudio header auth in discovery

* fix: prefer lmstudio header auth for discovery

* fix: honor lmstudio header auth in warmup paths

* fix: clear stale lmstudio profile auth

* fix: ignore lmstudio env auth on header migration

* fix: use local lmstudio setup seam

* fix: resolve lmstudio rebase fallout

---------

Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-13 15:22:44 +08:00