@tonyclaw/llm-inspector 1.14.4 → 1.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{index-o0Ui96SM.css → index-BFNoWwFI.css} +1 -1
- package/.output/public/assets/{index-5yrjXc3u.js → index-LH-YtFEM.js} +25 -25
- package/.output/public/assets/{main-CC0TDCAo.js → main-Dp5657Eq.js} +1 -1
- package/.output/server/_ssr/{index-Cz6oxzsy.mjs → index-D2yS8VvO.mjs} +53 -9
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-Bl3OCdGC.mjs → router-DCfjmmJu.mjs} +52 -30
- package/.output/server/{_tanstack-start-manifest_v-Oekf1osO.mjs → _tanstack-start-manifest_v-DupqJc5d.mjs} +1 -1
- package/.output/server/index.mjs +28 -28
- package/package.json +1 -1
- package/src/assets/logos/claude-code.svg +4 -0
- package/src/assets/logos/opencode.svg +4 -0
- package/src/components/providers/ImportWizardDialog.tsx +55 -17
- package/src/proxy/providerImporters.ts +32 -2
|
@@ -37,11 +37,41 @@ function getEnvValue(envObj: unknown, key: string): string | undefined {
|
|
|
37
37
|
return typeof val === "string" ? val.trim() : undefined;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// Map of well-known API hostnames to their proper brand names.
|
|
41
|
+
// The key is the domain (second-level domain extracted from the hostname),
|
|
42
|
+
// matched case-insensitively.
|
|
43
|
+
const KNOWN_PROVIDER_NAMES: Record<string, string> = {
|
|
44
|
+
deepseek: "DeepSeek",
|
|
45
|
+
minimaxi: "MiniMax",
|
|
46
|
+
openai: "OpenAI",
|
|
47
|
+
anthropic: "Anthropic",
|
|
48
|
+
openrouter: "OpenRouter",
|
|
49
|
+
groq: "Groq",
|
|
50
|
+
together: "Together",
|
|
51
|
+
fireworks: "Fireworks",
|
|
52
|
+
bedrock: "Bedrock",
|
|
53
|
+
vertexai: "Vertex AI",
|
|
54
|
+
azure: "Azure",
|
|
55
|
+
moonshot: "Moonshot",
|
|
56
|
+
zhipu: "ZhipuAI",
|
|
57
|
+
qwen: "Qwen",
|
|
58
|
+
baichuan: "Baichuan",
|
|
59
|
+
iflytek: "iFlytek",
|
|
60
|
+
doubao: "Doubao",
|
|
61
|
+
lingyiwanwu: "LingyiWanwu",
|
|
62
|
+
stepfun: "StepFun",
|
|
63
|
+
};
|
|
64
|
+
|
|
40
65
|
function deriveNameFromUrl(url: string): string {
|
|
41
66
|
try {
|
|
42
67
|
const hostname = new URL(url).hostname;
|
|
43
68
|
const parts = hostname.split(".");
|
|
44
69
|
const domain = parts.length >= 2 ? (parts[parts.length - 2] ?? hostname) : hostname;
|
|
70
|
+
const domainLower = domain.toLowerCase();
|
|
71
|
+
// Check known providers first
|
|
72
|
+
if (KNOWN_PROVIDER_NAMES[domainLower] !== undefined) {
|
|
73
|
+
return KNOWN_PROVIDER_NAMES[domainLower];
|
|
74
|
+
}
|
|
45
75
|
return domain.charAt(0).toUpperCase() + domain.slice(1);
|
|
46
76
|
} catch {
|
|
47
77
|
return "Imported Provider";
|
|
@@ -161,8 +191,8 @@ function detectOpenCodeProviders(): ExternalProvider[] {
|
|
|
161
191
|
if (typeof modelDef === "string") {
|
|
162
192
|
modelSet.add(modelDef);
|
|
163
193
|
} else if (isRecord(modelDef)) {
|
|
164
|
-
|
|
165
|
-
modelSet.add(
|
|
194
|
+
// modelId is the actual model identifier sent to the remote API
|
|
195
|
+
modelSet.add(modelId);
|
|
166
196
|
} else {
|
|
167
197
|
modelSet.add(modelId);
|
|
168
198
|
}
|