feat(models): add safe description overlays for model metadata + surface descriptions in model picker/settings#349
Open
B-Deforce wants to merge 2 commits into
Conversation
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.
Summary
What this changes
Adds
code_puppy/model_descriptions.pywith:apply_description_overlays(...)get_model_description(...)Adds a new callback hook:
load_model_descriptionsincode_puppy/callbacks.pyUpdates
ModelFactory.load_config()to apply description overlays after config merges:models.jsondescriptionsImproves model UX:
/modelcompletion now shows description metadata (with fallback)Updates
code_puppy/models.jsondescriptions for current OSS models.Adds/updates tests:
tests/test_model_descriptions.pyAGENTS.mdforload_model_descriptionsWhy
Model configs are merged from multiple sources using shallow updates.
Without a description-only overlay pass, metadata can be lost or overwritten unintentionally.
This keeps descriptions reliable while preserving all non-description model fields.
Guardrails
apply_description_overlays(...)intentionally:descriptionwhen missing/blankValidation
Ran formatting/lint on touched files:
isort --profile black ...ruff format ...ruff check --fix ...ruff check ...Ran targeted tests:
tests/test_model_descriptions.pytests/command_line/test_model_picker_completion.pytests/command_line/test_model_settings_menu_coverage.pyAll passed locally.