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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user