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

@@ -103,27 +103,9 @@ describe("convertClaudeToCopilot", () => {
expect(parsed.body).toMatch(/## Capabilities\n- Threat modeling\n- OWASP/)
})
test("agent model field is passed through", () => {
test("model field is dropped (Copilot model format differs from Claude model IDs)", () => {
const bundle = convertClaudeToCopilot(fixturePlugin, defaultOptions)
const parsed = parseFrontmatter(bundle.agents[0].content)
expect(parsed.data.model).toBe("claude-sonnet-4-20250514")
})
test("agent without model omits model field", () => {
const plugin: ClaudePlugin = {
...fixturePlugin,
agents: [
{
name: "no-model",
description: "No model agent",
body: "Content.",
sourcePath: "/tmp/plugin/agents/no-model.md",
},
],
}
const bundle = convertClaudeToCopilot(plugin, defaultOptions)
const parsed = parseFrontmatter(bundle.agents[0].content)
expect(parsed.data.model).toBeUndefined()
})