test(providers): use a non-reserved prefix in the CC-compatible node create cases

93da24cd7 ("fix(providers): reject reserved provider prefixes on
compatible-node create/update") made createProviderNodeSchema reject any
prefix that is a built-in REGISTRY id or alias. "cc" is the alias of the
built-in `claude` provider, so the two provider-nodes create cases in
cc-compatible-provider.test.ts started getting a 400 schema rejection
before the route ever reached its feature-flag gate (403) or the create
path (201) — the guard PR updated its own tests but missed this sibling
file, leaving a base-red on release/v3.8.50.

The operator-chosen prefix is incidental to what these cases assert (the
ENABLE_CC_COMPATIBLE_PROVIDER gate, the dedicated
anthropic-compatible-cc- id prefix, baseUrl sanitization and the nulled
modelsPath), so switch it to a non-reserved "cc-proxy". No assertion was
removed or loosened.
This commit is contained in:
diegosouzapw
2026-08-25 08:06:25 +00:00
parent 80f107d5a0
commit b4a636cf1e

View File

@@ -808,7 +808,12 @@ test("provider-nodes create route rejects CC mode when feature flag is disabled"
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name: "Hidden CC",
prefix: "cc",
// #93da24cd7 reserved-prefix guard: "cc" is the built-in `claude`
// registry alias, so a compatible node created with it would never be
// reachable at runtime and is now rejected (400) at the write path.
// These cases are about the CC feature flag / dedicated id prefix, not
// about the operator-chosen prefix, so use a non-reserved one.
prefix: "cc-proxy",
baseUrl: "https://proxy.example.com/v1",
type: "anthropic-compatible",
compatMode: "cc",
@@ -828,7 +833,12 @@ test("provider-nodes create route creates CC node with dedicated prefix when ena
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name: "Hidden CC",
prefix: "cc",
// #93da24cd7 reserved-prefix guard: "cc" is the built-in `claude`
// registry alias, so a compatible node created with it would never be
// reachable at runtime and is now rejected (400) at the write path.
// These cases are about the CC feature flag / dedicated id prefix, not
// about the operator-chosen prefix, so use a non-reserved one.
prefix: "cc-proxy",
baseUrl: "https://proxy.example.com/v1/messages?beta=true",
type: "anthropic-compatible",
compatMode: "cc",