Add embedding profile size aliases (small/base/large)#10
Conversation
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/4f105fb2-0732-4ca7-9d69-3c45b6efed46 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds size-oriented embedding profile aliases to make codexa init --profile easier to choose on constrained hardware, while keeping resolution consistent via the model registry.
Changes:
- Extend embedding profile alias mapping to include
base → balancedandlarge → precise(alongsidesmall → fast). - Update
codexa init --profileoption validation/help text to accept and describe the new aliases. - Add docs and CLI tests covering the new alias selections.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| semantic_code_intelligence/tests/test_cli.py | Adds a new CLI test ensuring small/base/large map to the expected underlying profiles. |
| semantic_code_intelligence/embeddings/model_registry.py | Extends PROFILE_ALIASES to include base and large aliases. |
| semantic_code_intelligence/cli/commands/init_cmd.py | Expands Click --profile choices and updates help text to mention aliases. |
| README.md | Documents the new alias mappings in the init section. |
| docs/guide/quickstart.md | Adds a quickstart note listing the alias mappings. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/32741dfd-37b7-48fd-8d87-9f5a3d22ba79 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Added explicit output checks so the base alias must resolve and emit the profile message; test now fails if resolution silently falls back (d5126fc). |
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/32741dfd-37b7-48fd-8d87-9f5a3d22ba79 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/32741dfd-37b7-48fd-8d87-9f5a3d22ba79 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/32741dfd-37b7-48fd-8d87-9f5a3d22ba79 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Updated init CLI to consume centralized profile choices from the registry (including aliases) and parameterized the profile alias test for easier future additions; covered in 1752a7d. |
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/570de38e-a8b7-47cc-87a0-675875c17a17 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
| CORE_PROFILES: list[str] = ["fast", "balanced", "precise"] | ||
| ALL_PROFILE_NAMES = set(PROFILE_ALIASES.keys()) | set(MODEL_PROFILES.keys()) | ||
| CLI_PROFILE_CHOICES: list[str] = [ |
There was a problem hiding this comment.
all_profile_names is a module-level constant used to build CLI_PROFILE_CHOICES, but it’s named like a local variable while surrounding constants are uppercase (PROFILE_ALIASES, CORE_PROFILES, CLI_PROFILE_CHOICES). Renaming it to ALL_PROFILE_NAMES (or inlining it) would keep naming consistent and make it clearer this is part of the public/constant configuration.
There was a problem hiding this comment.
Renamed the profile-name union constant to ALL_PROFILE_NAMES and kept it alongside the other registry constants; changes in f1cf67d.
| type=click.Choice(CLI_PROFILE_CHOICES, case_sensitive=False), | ||
| default=None, | ||
| help="Embedding model profile: fast (tiny, low RAM), balanced (default), precise (code-optimised).", | ||
| help="Embedding model profile: fast (low RAM), balanced (default), or precise (code-optimized). Size aliases (small/base/large) are supported.", |
There was a problem hiding this comment.
The --profile option now accepts all values in CLI_PROFILE_CHOICES, which (via PROFILE_ALIASES) includes aliases like default, quality, and code in addition to small/base/large. The help text only mentions the size aliases, so CLI help/error output can suggest values that aren’t described. Either update the help text to mention the full alias set, or narrow CLI_PROFILE_CHOICES to only the intended user-facing aliases.
| help="Embedding model profile: fast (low RAM), balanced (default), or precise (code-optimized). Size aliases (small/base/large) are supported.", | |
| help=( | |
| "Embedding model profile: fast (low RAM), balanced (default), or precise (code-optimized). " | |
| "Size aliases (small/base/large) and named aliases (default, quality, code) are supported." | |
| ), |
| print_info(f"Use: codexa init --profile <{'|'.join(CLI_PROFILE_CHOICES)}>") | ||
|
|
||
|
|
There was a problem hiding this comment.
Printing Use: codexa init --profile <...> by joining CLI_PROFILE_CHOICES can produce a long/cryptic list (e.g., including default|quality|code alongside canonical profiles), which may be confusing since models profiles itself only displays the canonical profiles. Consider formatting this as fast|balanced|precise plus a short note listing the supported aliases/mappings, rather than dumping every accepted token.
| print_info(f"Use: codexa init --profile <{'|'.join(CLI_PROFILE_CHOICES)}>") | |
| canonical_names = sorted({p.name for p in MODEL_PROFILES.values()}) | |
| print_info(f"Use: codexa init --profile <{'|'.join(canonical_names)}>") | |
| # Show a concise note about additional aliases, if any, without dumping every token inline. | |
| alias_map: dict[str, set[str]] = {} | |
| for choice in CLI_PROFILE_CHOICES: | |
| try: | |
| profile = resolve_profile(choice) | |
| except Exception: | |
| # Be defensive: ignore any unexpected tokens rather than breaking CLI output. | |
| continue | |
| if profile is None: | |
| continue | |
| if choice == profile.name: | |
| # Skip canonical names; we already show them above. | |
| continue | |
| alias_map.setdefault(profile.name, set()).add(choice) | |
| if alias_map: | |
| alias_parts = [] | |
| for name in sorted(alias_map.keys()): | |
| aliases = "/".join(sorted(alias_map[name])) | |
| alias_parts.append(f"{name} ({aliases})") | |
| print_info(f"Aliases also supported: {', '.join(alias_parts)}") |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/137ecca9-e42d-46a5-84a8-b3f5282baf82 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
Expanded the init help text to mention all supported aliases and updated models profiles guidance to show canonical profiles with a concise alias note (see f1cf67d). |
Agent-Logs-Url: https://github.com/M9nx/CodexA/sessions/137ecca9-e42d-46a5-84a8-b3f5282baf82 Co-authored-by: M9nx <90654832+M9nx@users.noreply.github.com>
codexa init --profilehelp text to mention both size and named aliases now accepted.codexa models profilesguidance to show canonical profiles with a concise alias note.