Skip to content

test: add high-level @iq* quant regression coverage#1

Open
Sanjays2402 wants to merge 2 commits intoBartok9:fix/71474-lmstudio-at-sign-model-namesfrom
Sanjays2402:add-iq-suffix-tests
Open

test: add high-level @iq* quant regression coverage#1
Sanjays2402 wants to merge 2 commits intoBartok9:fix/71474-lmstudio-at-sign-model-namesfrom
Sanjays2402:add-iq-suffix-tests

Conversation

@Sanjays2402
Copy link
Copy Markdown

Ports the high-level test coverage from openclaw#71490 onto your branch, per steipete's review.

Adds 4 tests at the symptom sites — so any future regression in either layer fails at the user-visible path, not just the splitter.

src/agents/model-selection.test.ts (+2)

  • resolveModelRefFromString preserves lmstudio/qwen3.6-27b@iq3_xxs as the model id
  • Same input with trailing @work correctly splits the auth profile

src/auto-reply/model.test.ts (+2)

  • /model lmstudio/qwen3.6-27b@iq3_xxs keeps the full model id, no profile
  • /model lmstudio/qwen3.6-27b@iq3_xxs@work keeps the full model id with work profile

Verification

  • 134/134 tests pass across model-ref-profile, model-selection, auto-reply/model
  • oxlint clean

Tests-only, no code changes — all behavior comes from your existing parser + provider patch.

Bartok9 and others added 2 commits April 25, 2026 04:40
…ution

stripModelProfileSuffix() in providers.ts naively truncated model names at
the first '@', discarding quant variants like @iq3_xxs, @iq4_xs, @q4_k_xl
that LM Studio uses to distinguish quantization levels.

This caused two user-facing bugs (fixes openclaw#71474):
1. /model lmstudio/qwen3.6-27b@iq3_xxs → 'model not allowed: lmstudio/qwen3.6-27b'
2. API requests sent truncated model name → LM Studio picked a random quant

Changes:
- Replace the naive indexOf('@') strip in providers.ts with
  splitTrailingAuthProfile() which already handles quant suffixes
- Extend the quant-suffix regex (q\d+...) to also match importance-
  quantization tags (iq3_xxs, iq4_xs, ...) via i?q\d+ pattern
- Add tests for @iq* quant suffixes and auth-profile-after-iq combos
Locks the two user-visible paths from openclaw#71474:

- resolveModelRefFromString preserves `lmstudio/qwen3.6-27b@iq3_xxs`
  as model id (not truncated to `qwen3.6-27b`).
- /model directive: same input keeps the full model, and the trailing
  `@work` form still splits into model + auth profile.

Ported from openclaw#71490 per maintainer review on this PR.
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.

2 participants