Fix sandbox inference route provider duplication
This commit is contained in:
@@ -12,6 +12,7 @@ const ollamaModelsRoutePath = path.join(root, 'app/api/ollama/models/route.ts')
|
||||
const sandboxInferenceRoutePath = path.join(root, 'app/api/sandbox/[sandboxId]/inference/route.ts')
|
||||
const sandboxInferenceApplyRoutePath = path.join(root, 'app/api/sandbox/[sandboxId]/inference/apply/route.ts')
|
||||
const sandboxInferenceApplyLibPath = path.join(root, 'app/lib/sandboxInferenceApply.ts')
|
||||
const sandboxInferenceStorePath = path.join(root, 'app/lib/sandboxInferenceStore.ts')
|
||||
const sandboxRestartRoutePath = path.join(root, 'app/api/sandbox/[sandboxId]/restart/route.ts')
|
||||
const hookPath = path.join(root, 'app/hooks/useSandboxInventory.ts')
|
||||
const pagePath = path.join(root, 'app/page.tsx')
|
||||
@@ -30,6 +31,7 @@ const ollamaModelsRouteSource = await readFile(ollamaModelsRoutePath, 'utf8')
|
||||
const sandboxInferenceRouteSource = await readFile(sandboxInferenceRoutePath, 'utf8')
|
||||
const sandboxInferenceApplyRouteSource = await readFile(sandboxInferenceApplyRoutePath, 'utf8')
|
||||
const sandboxInferenceApplyLibSource = await readFile(sandboxInferenceApplyLibPath, 'utf8')
|
||||
const sandboxInferenceStoreSource = await readFile(sandboxInferenceStorePath, 'utf8')
|
||||
const sandboxRestartRouteSource = await readFile(sandboxRestartRoutePath, 'utf8')
|
||||
const hookSource = await readFile(hookPath, 'utf8')
|
||||
const pageSource = await readFile(pagePath, 'utf8')
|
||||
@@ -83,6 +85,9 @@ assert.match(ollamaModelsRouteSource, /OLLAMA_BASE_URL/, 'Ollama models route mu
|
||||
assert.match(sandboxInferenceRouteSource, /parseRoutes/, 'sandbox inference route must accept multiple provider/model routes')
|
||||
assert.match(sandboxInferenceRouteSource, /primaryRouteId/, 'sandbox inference route must preserve the primary route selection')
|
||||
assert.match(sandboxInferenceRouteSource, /saveSandboxInferenceConfig/, 'sandbox inference route must persist per-sandbox inference profiles')
|
||||
assert.match(sandboxInferenceRouteSource, /const id = `\$\{provider\}::\$\{model\}`/, 'sandbox inference route must canonicalize route ids from provider/model pairs')
|
||||
assert.match(sandboxInferenceStoreSource, /hasExplicitRoutes \? \[\] : legacyModels\.map/, 'sandbox inference store must not re-expand legacy provider/models when explicit routes are present')
|
||||
assert.match(sandboxInferenceStoreSource, /const id = `\$\{provider\}::\$\{model\}`/, 'sandbox inference store must canonicalize route ids from provider/model pairs')
|
||||
assert.match(sandboxInferencePanelSource, /Save Sandbox Routes/, 'selected sandbox UI must expose multi-route inference saving')
|
||||
assert.match(sandboxInferencePanelSource, /Apply to Running Container/, 'selected sandbox UI must expose live apply for running containers')
|
||||
assert.match(sandboxInferencePanelSource, /Verified Working Routes/, 'selected sandbox UI must list verified active inference routes')
|
||||
|
||||
Reference in New Issue
Block a user