feat(agent): unify models and validate OpenCode providers
Generate chat, task and learning models from agent-models.json. Use WaterNetwork fast/expert models with 272k context and validate upstream names before readiness. Add an isolated model check command with signal-safe cleanup and plugin, Skill and MCP management docs. Verified in isolation: type checks, 26 focused tests and both model catalog checks; no model inference requests.
This commit is contained in:
@@ -4,6 +4,7 @@ import { createBusinessStageTracker } from "./chatBusinessStages.js";
|
||||
|
||||
import { writeLlmRequestAuditLog } from "../audit/llmRequestAudit.js";
|
||||
import { type SupportedModel } from "../chat/models.js";
|
||||
import { toRuntimeModel } from "../chat/modelConfig.js";
|
||||
import { config } from "../config.js";
|
||||
import { executionPlanSchema } from "./executionPlan.js";
|
||||
import { logger } from "../logger.js";
|
||||
@@ -104,20 +105,6 @@ const getPermissionTarget = (metadata: unknown) => {
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const toRuntimeModel = (model?: SupportedModel) => {
|
||||
if (!model) {
|
||||
return undefined;
|
||||
}
|
||||
const [providerID, modelID] = model.split("/");
|
||||
if (!providerID || !modelID) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
providerID,
|
||||
modelID,
|
||||
};
|
||||
};
|
||||
|
||||
const parseToolOutput = (output: unknown): unknown => {
|
||||
if (typeof output !== "string") return output;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user