Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions packages/models/src/models/alibaba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1684,25 +1684,36 @@ export const alibabaModels = [
{
providerId: "scx-ai-gp",
externalId: "qwen3.8-max",
// SCX has not brought this deployment online yet: it is absent from
// their /v1/models listing and chat completions return "Unsupported
// model". Drop this once the deployment is live and verified.
test: "skip",
inputPrice: "1.815e-6",
cachedInputPrice: "0.21e-6",
cacheReadInputPrice: "0.17e-6",
cacheWriteInputPrice: "2.5e-6",
outputPrice: "5.4461e-6",
requestPrice: "0",
contextSize: 1000000,
maxOutput: 131072,
quantization: "fp8",
streaming: true,
reasoning: true,
// The upstream model is natively multimodal, but image input on SCX's
// deployment is unverified. Leave false so routing does not send image
// requests here until it is confirmed to work.
vision: false,
reasoningMaxTokens: true,
reasoningOutput: "omit",
streaming: true,
vision: true,
tools: true,
webSearch: true,
webSearchPrice: "0.01",
jsonOutput: true,
Comment on lines +1697 to 1704

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

# Expect: determine whether test: "skip" affects production routing or only tests.
rg -n -C 8 'test:\s*"skip"|deactivatedAt|providerId:\s*"scx-ai-gp"|qwen3\.8-max' packages --glob '*.ts'

Repository: theopenco/llmgateway

Length of output: 50377


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '--- Candidate files mentioning test/selection/deactivatedAt ---\n'
rg -n --glob '*.ts' 'type .*Test|deactivatedAt|test:\s*"skip"|skip.*provider|active provider|providers.*deactivated|isDeleted|deletedAt' packages --glob '*.ts' --max-count 200

printf '\n--- Model definition typed definitions ---\n'
fd -e ts 'types\.ts|types.*\.ts|model.*\.ts' packages --max-depth 4 | head -80 | xargs rg -n "export .*ProviderDefinition|deactivatedAt:|interface .*Provider|type .*Provider"

Repository: theopenco/llmgateway

Length of output: 249


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- Candidate files mentioning test/selection/deactivatedAt ---'
rg -n --glob '*.ts' 'type .*Test|deactivatedAt|test:\s*"skip"|skip.*provider|active provider|providers.*deactivated|isDeleted|deletedAt' packages --glob '*.ts' --max-count 200

printf '%s\n' ''
printf '%s\n' '--- Model definition typed definitions ---'
fd -e ts 'types\.ts|types.*\.ts|model.*\.ts' packages --max-depth 4 | head -80 | xargs rg -n "export .*ProviderDefinition|deactivatedAt:|interface .*Provider|type .*Provider"

Repository: theopenco/llmgateway

Length of output: 30600


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- packages/models/src/models.ts ProviderModelMapping lines 170-190 ---'
sed -n '170,190p' packages/models/src/models.ts

printf '%s\n' ''
printf '%s\n' '--- packages/actions/src/get-cheapest-model-for-provider.ts ---'
sed -n '1,80p' packages/actions/src/get-cheapest-model-for-provider.ts

printf '%s\n' ''
printf '%s\n' '--- script around active provider selection ---'
sed -n '170,195p' packages/scripts/src/export-models-dev.ts

printf '%s\n' ''
printf '%s\n' '--- model metadata provider filtering ---'
rg -n --glob '*.ts' 'ProviderModelMapping|deactivatedAt|providers\.find|providers\.filter|isMappingDeactivated|getCheapest' packages/shared packages/actions packages/scripts --max-count 200

Repository: theopenco/llmgateway

Length of output: 21447


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- select-provider-mapping.ts ---'
sed -n '1,100p' packages/actions/src/select-provider-mapping.ts

printf '%s\n' ''
printf '%s\n' '--- routes/tests mentioning test flag ---'
rg -n --glob '*.spec.ts' --glob '*.test.ts' -C 4 'test:\s*"skip"|onlyModel|skipTest|skip.*model|should not|should.*skip' packages --max-count 250

Repository: theopenco/llmgateway

Length of output: 12139


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- exact test flag consumers ---'
rg -n --glob '*.ts' --glob '!packages/**/*.spec.ts' -C 5 'providerMapping|\btest\b|\.find\(\(\s*p\s*\)\s*=>\s*.*providerId' packages --max-count 300

printf '%s\n' ''
printf '%s\n' '--- model availability/export definitions around providers fields ---'
sed -n '70,130p' packages/shared/src/components/models-directory/api-types.ts
sed -n '415,480p' packages/models/src/models.ts

Repository: theopenco/llmgateway

Length of output: 50379


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
import ast, pathlib, re

models_ts = pathlib.Path("packages/models/src/models.ts").read_text()
tree = ast.parse(models_ts)

fields = []
for node in ast.walk(tree):
    if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):
        fields.append(node.name)

def parse_decl(text):
    try:
        return ast.parse(text).body[0]
    except Exception:
        return None

for const_name in ["ProviderMapping", "ProviderModelMapping"]:
    decls = []
    for name in fields:
        source = getattr(tree, name, None) if isinstance(tree, ast.AST) else None
    # use direct search around names
PY

printf '%s\n' '--- Locate type alias declarations by line ---'
rg -n 'const ProviderMapping|interface ProviderMapping|type ProviderMapping|interface ProviderModelMapping|type ProviderModelMapping' packages/models src --glob '*.ts'

printf '%s\n' ''
printf '%s\n' '--- Test-flag consumers excluding spec files narrowed ---'
rg -n --glob '*.ts' -C 5 '\bproviderMapping|findProviderMapping|selectProviderMapping|getCheapestModelForProvider|getCheapestFromAvailableProviders' packages/actions packages/shared packages/scripts --max-count 250

Repository: theopenco/llmgateway

Length of output: 462


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- all test flag references in non-spec TypeScript files ---'
rg -n --glob '*.ts' '!packages/**/*.spec.ts' -C 3 'test\b|skip|test:\s*|"skip"' packages/actions packages/shared packages/scripts packages/models/src --max-count 250

Repository: theopenco/llmgateway

Length of output: 292


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- all test flag references in non-spec TypeScript files ---'
rg -n --glob '*.ts' '!**/.spec.ts' -C 3 'test\b|skip|test:\s*|"skip"' packages/actions packages/shared packages/scripts packages/models/src --max-count 250 || true

Repository: theopenco/llmgateway

Length of output: 292


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- all test flag references in non-spec TypeScript files ---'
rg -n --glob 'packages/**/*.ts' --glob '!packages/**/*.spec.ts' -C 3 'test:"skip"|test:\s*"skip"|test: "skip"|skip' packages/actions packages/shared packages/scripts packages/models --max-count 250 || true

printf '%s\n' ''
printf '%s\n' '--- provider mapping selection code ---'
sed -n '1,60p' packages/actions/src/select-provider-mapping.ts
rg -n --glob 'packages/**/*.ts' -C 3 'selectProviderMapping\(|ProviderModelMapping\[\]|\.find\(\(p\)|deactivatedAt' packages/actions packages/shared packages/scripts --max-count 200

Repository: theopenco/llmgateway

Length of output: 50377


Remove test: "skip" on the SCX provider mapping.

test does not exclude a provider from production routing, only from model tests. Since scx-ai-gp returns Unsupported model, add deactivatedAt: new Date("2026-08-06") (or the review date) rather than relying on the test skip flag.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/models/src/models/alibaba.ts` around lines 1698 - 1703, Update the
SCX provider mapping near the capabilities fields to remove the test skip
setting and add deactivatedAt with the review date (or 2026-08-06), so scx-ai-gp
is excluded from production routing.

Source: Coding guidelines

supportedParameters: [
"temperature",
"max_tokens",
"top_p",
"frequency_penalty",
"presence_penalty",
"stop",
"stream",
"tools",
"response_format",
"reasoning_effort",
],
},
],
},
Expand Down
Loading