Skip to content

fix: support LM Studio JSON response format - #586

Closed
jia030928 wants to merge 1 commit into
MemTensor:v1.2.1from
jia030928:fix-lmstudio-response-format
Closed

jia030928 wants to merge 1 commit into
MemTensor:v1.2.1from
jia030928:fix-lmstudio-response-format

Conversation

@jia030928

Copy link
Copy Markdown

LM Studio rejects Memmy JSON requests because it accepts response_format.type values json_schema or text, while the OpenAI-compatible client always sent json_object. This caused both memory summary and reflection jobs to fail with HTTP 400.

The client now retries this specific compatibility error with text and remembers that capability for later JSON requests. Explicit response-format overrides remain unchanged, and unrelated 400 responses still fail normally.

Validation:

  • Real LM Studio google/gemma-4-e4b: summary and reflection both succeeded
  • Packaged Memory runtime against LM Studio: summary and reflection both succeeded
  • npm run test -w @memmy/memory (119 files passed; 1092 tests passed; 1 skipped)
  • npm run lint
  • npm run typecheck
  • macOS arm64 CN unsigned package built and DMG verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant