mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
Fix combo modal
This commit is contained in:
@@ -144,9 +144,10 @@ export const PROVIDER_MODELS = {
|
|||||||
],
|
],
|
||||||
oc: [ // OpenCode
|
oc: [ // OpenCode
|
||||||
{ id: "nemotron-3-super-free", name: "Nemotron 3 Super" },
|
{ id: "nemotron-3-super-free", name: "Nemotron 3 Super" },
|
||||||
{ id: "qwen3.6-plus-free", name: "Qwen 3.6 Plus" },
|
// { id: "qwen3.6-plus-free", name: "Qwen 3.6 Plus" },
|
||||||
// { id: "big-pickle", name: "Big Pickle", targetFormat: "claude" },
|
// { id: "big-pickle", name: "Big Pickle", targetFormat: "claude" },
|
||||||
{ id: "minimax-m2.5-free", name: "MiniMax M2.5", targetFormat: "claude" },
|
{ id: "minimax-m2.5-free", name: "MiniMax M2.5", targetFormat: "claude" },
|
||||||
|
// { id: "trinity-large-preview-free", name: "Trinity Large Preview" },
|
||||||
],
|
],
|
||||||
|
|
||||||
cl: [ // Cline
|
cl: [ // Cline
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ export const PROVIDERS = {
|
|||||||
claude: {
|
claude: {
|
||||||
baseUrl: "https://api.anthropic.com/v1/messages",
|
baseUrl: "https://api.anthropic.com/v1/messages",
|
||||||
format: "claude",
|
format: "claude",
|
||||||
retry: { 429: 0 },
|
|
||||||
headers: {
|
headers: {
|
||||||
"Anthropic-Version": "2023-06-01",
|
"Anthropic-Version": "2023-06-01",
|
||||||
"Anthropic-Beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28",
|
"Anthropic-Beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28",
|
||||||
@@ -179,6 +178,7 @@ export const PROVIDERS = {
|
|||||||
kiro: {
|
kiro: {
|
||||||
baseUrl: "https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",
|
baseUrl: "https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",
|
||||||
format: "kiro",
|
format: "kiro",
|
||||||
|
retry: { 429: 2 },
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Accept": "application/vnd.amazon.eventstream",
|
"Accept": "application/vnd.amazon.eventstream",
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ export const RETRY_CONFIG = {
|
|||||||
|
|
||||||
// Default retry config by status code (number of retry attempts)
|
// Default retry config by status code (number of retry attempts)
|
||||||
export const DEFAULT_RETRY_CONFIG = {
|
export const DEFAULT_RETRY_CONFIG = {
|
||||||
429: 2, // Rate limit - retry 2 times
|
429: 0, // Rate limit - no retry, use account fallback instead
|
||||||
503: 0, // Service unavailable - no retry
|
503: 1, // Service unavailable - retry 1 time (transient)
|
||||||
502: 0 // Bad gateway - no retry
|
502: 1 // Bad gateway - retry 1 time (transient)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Exponential backoff config for rate limits
|
// Exponential backoff config for rate limits
|
||||||
|
|||||||
@@ -448,7 +448,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
|
|||||||
<p className="text-xs text-text-muted">No models added yet</p>
|
<p className="text-xs text-text-muted">No models added yet</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col gap-1 max-h-[200px] overflow-y-auto">
|
<div className="flex flex-col gap-1 max-h-[350px] overflow-y-auto">
|
||||||
{models.map((model, index) => (
|
{models.map((model, index) => (
|
||||||
<ModelItem
|
<ModelItem
|
||||||
key={index}
|
key={index}
|
||||||
@@ -472,7 +472,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
|
|||||||
{/* Add Model button */}
|
{/* Add Model button */}
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowModelSelect(true)}
|
onClick={() => setShowModelSelect(true)}
|
||||||
className="w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1"
|
className="w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1"
|
||||||
>
|
>
|
||||||
<span className="material-symbols-outlined text-[16px]">add</span>
|
<span className="material-symbols-outlined text-[16px]">add</span>
|
||||||
Add Model
|
Add Model
|
||||||
|
|||||||
@@ -11,15 +11,17 @@ const IS_WINDOWS = os.platform() === "win32";
|
|||||||
const BIN_NAME = IS_WINDOWS ? `${BINARY_NAME}.exe` : BINARY_NAME;
|
const BIN_NAME = IS_WINDOWS ? `${BINARY_NAME}.exe` : BINARY_NAME;
|
||||||
const BIN_PATH = path.join(BIN_DIR, BIN_NAME);
|
const BIN_PATH = path.join(BIN_DIR, BIN_NAME);
|
||||||
|
|
||||||
const GITHUB_BASE_URL = "https://github.com/cloudflare/cloudflared/releases/latest/download";
|
const CLOUDFLARED_VERSION = "2026.3.0";
|
||||||
|
const GITHUB_BASE_URL = `https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}`;
|
||||||
|
|
||||||
const PLATFORM_MAPPINGS = {
|
const PLATFORM_MAPPINGS = {
|
||||||
darwin: {
|
darwin: {
|
||||||
x64: "cloudflared-darwin-amd64.tgz",
|
x64: "cloudflared-darwin-amd64.tgz",
|
||||||
arm64: "cloudflared-darwin-amd64.tgz"
|
arm64: "cloudflared-darwin-arm64.tgz"
|
||||||
},
|
},
|
||||||
win32: {
|
win32: {
|
||||||
x64: "cloudflared-windows-amd64.exe"
|
x64: "cloudflared-windows-amd64.exe",
|
||||||
|
x32: "cloudflared-windows-386.exe"
|
||||||
},
|
},
|
||||||
linux: {
|
linux: {
|
||||||
x64: "cloudflared-linux-amd64",
|
x64: "cloudflared-linux-amd64",
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export default function Modal({
|
|||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
{(title || showCloseButton) && (
|
{(title || showCloseButton) && (
|
||||||
<div className="flex items-center justify-between p-6 border-b border-black/5 dark:border-white/5">
|
<div className="flex items-center justify-between p-2 border-b border-black/5 dark:border-white/5">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<div className="flex items-center gap-2 mr-4">
|
<div className="flex items-center gap-2 mr-4">
|
||||||
<div className="w-3 h-3 rounded-full bg-[#FF5F56]" />
|
<div className="w-3 h-3 rounded-full bg-[#FF5F56]" />
|
||||||
@@ -94,7 +94,7 @@ export default function Modal({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Body */}
|
{/* Body */}
|
||||||
<div className="p-6 max-h-[calc(80vh-140px)] overflow-y-auto">{children}</div>
|
<div className="p-6 max-h-[calc(85vh-100px)] overflow-y-auto">{children}</div>
|
||||||
|
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
{footer && (
|
{footer && (
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ export default function ModelSelectModal({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Models grouped by provider - compact */}
|
{/* Models grouped by provider - compact */}
|
||||||
<div className="max-h-[300px] overflow-y-auto space-y-3">
|
<div className="max-h-[400px] overflow-y-auto space-y-3">
|
||||||
{/* Combos section - always first */}
|
{/* Combos section - always first */}
|
||||||
{filteredCombos.length > 0 && (
|
{filteredCombos.length > 0 && (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user