refactor(athena): consolidate parseModelString to single source of truth

This commit is contained in:
ismeth
2026-02-20 14:21:23 +01:00
committed by YeonGyu-Kim
parent aa3b5274c5
commit ad481472eb
5 changed files with 38 additions and 37 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
import { z } from "zod"
import { parseModelString } from "../../agents/athena/model-parser"
import { parseModelString } from "../../tools/delegate-task/model-string-parser"
/** Validates model string format: "provider/model-id" (e.g., "openai/gpt-5.3-codex"). */
const ModelStringSchema = z
.string()
.min(1)
.refine(
(model) => parseModelString(model) !== null,
(model) => parseModelString(model) !== undefined,
{ message: 'Model must be in "provider/model-id" format (e.g., "openai/gpt-5.3-codex")' }
)