feat(converters): centralize model field normalization across targets (#442)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trevin Chow
2026-03-29 13:08:35 -07:00
committed by GitHub
parent 35678b8add
commit f93d10cf60
12 changed files with 404 additions and 78 deletions

View File

@@ -1,4 +1,5 @@
import { formatFrontmatter } from "../utils/frontmatter"
import { normalizeModelWithProvider } from "../utils/model"
import { sanitizePathName } from "../utils/files"
import type {
ClaudeAgent,
@@ -104,7 +105,7 @@ function convertAgentToSkill(agent: ClaudeAgent): OpenClawSkillFile {
}
if (agent.model && agent.model !== "inherit") {
frontmatter.model = agent.model
frontmatter.model = normalizeModelWithProvider(agent.model)
}
const body = rewritePaths(agent.body)
@@ -124,7 +125,7 @@ function convertCommandToSkill(command: ClaudeCommand): OpenClawSkillFile {
}
if (command.model && command.model !== "inherit") {
frontmatter.model = command.model
frontmatter.model = normalizeModelWithProvider(command.model)
}
const body = rewritePaths(command.body)