Modify generic name for model tiers

Co-Authored-By: win0na <winnie@winneon.moe>

refactor: neutral model vocabulary (low/mid/high) in source agents

feat(claude-code): cc_model_to_native() maps low/mid/high to haiku/sonnet/opus

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

feat(opencode): update oc_model_to_provider() for low/mid/high vocabulary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nunziati
2026-04-10 11:51:53 +00:00
parent 9a93cd4aa5
commit 5a15e5b79b
13 changed files with 46 additions and 21 deletions

View File

@@ -132,6 +132,18 @@ cc_match_tool_to_matcher() {
echo "$matcher"
}
# Neutral model tier → Claude Code model name.
cc_model_to_native() {
local model="$1"
case "$model" in
*/*) echo "$model" ;; # already qualified — passthrough
low) echo "haiku" ;;
mid) echo "sonnet" ;;
high) echo "opus" ;;
*) echo "$model" ;; # unknown — passthrough
esac
}
# adapter_translate_hooks <source_hooks_dir> <dest_root>
adapter_translate_hooks() {
local src="$1" dst="$2"
@@ -208,6 +220,7 @@ adapter_translate_agents() {
should_include "$agent" "$CC_PLATFORM" || continue
local name; name="$(parse_frontmatter "$agent" name)"
local model; model="$(parse_frontmatter "$agent" model)"
model="$(cc_model_to_native "$model")"
local caps; caps="$(parse_capabilities "$agent")"
# Build tools allowlist by expanding each capability.