Skip to content

fix(sound): enumerate expansion keys - #12787

Merged
mudler merged 1 commit into
masterfrom
fix/sound-keyscale-enum
Oct 20, 2026
Merged

mudler merged 1 commit into
masterfrom
fix/sound-keyscale-enum

Conversation

@mudler-agent

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #12783.

Offer the expansion model an explicit enum for keyscale instead of a pattern. The 504 entries preserve every key accepted by the existing validator, including aliases and root-only forms. Keep the field optional and instruct the model to omit unspecified optional fields.

Validation errors now quote only the rejected key, escaped and limited to 64 runes. Longer values include a truncation marker and total rune count. This exposes invalid notation without including other generated arguments. Server-side validation remains unchanged.

Update regression tests and documentation.

Notes for Reviewers

Verification passed:

go test -p 2 ./core/backend ./pkg/functions ./core/http/endpoints/elevenlabs -count=1
go test -p 2 -tags auth ./core/backend ./pkg/functions ./core/http/endpoints/elevenlabs -count=1
golangci-lint run ./core/backend/... ./pkg/functions/... ./core/http/endpoints/elevenlabs/...
golangci-lint run --build-tags auth ./core/backend/... ./pkg/functions/... ./core/http/endpoints/elevenlabs/...

Both lint runs report zero issues. Independent committed-range review passed.

Offline checks with the pinned native llama.cpp converter accepted all 504 keys plus omission and rejected 14 invalid cases. These checks cover grammar recognition, not live model generation. The original rejected key remains unknown; this change does not claim a confirmed end-to-end reproduction or fix of that particular output.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

List the existing keyscale vocabulary in the expansion tool schema.
Keep optional keys omitted when unspecified and retain server validation.

Quote rejected keys in validation errors, with a bounded prefix, so a
failed request exposes the invalid notation without other arguments.

Assisted-by: nib:gpt-6.1-sol
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler
mudler merged commit 0d77a40 into master Oct 20, 2026
69 of 71 checks passed
@mudler
mudler deleted the fix/sound-keyscale-enum branch October 20, 2026 11:14
@mudler-agent mudler-agent added the bug Something isn't working label Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants