Repository navigation
fix(sound): enumerate expansion keys - #12787
Merged
Merged
Conversation
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>
1 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #12783.
Offer the expansion model an explicit enum for
keyscaleinstead 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:
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