Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion open-sse/services/accountFallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
import { classify429FromError, type FailureKind } from "../../src/shared/utils/classify429";
import { resolveUseUpstream429BreakerHints } from "../../src/shared/utils/providerHints";

type ProviderProfile = {
export type ProviderProfile = {
baseCooldownMs: number;
useUpstreamRetryHints: boolean;
/** Issue #2100 follow-up. Stored override; undefined → per-provider default. */
Expand Down
3 changes: 2 additions & 1 deletion open-sse/services/reasoningCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const REASONING_REPLAY_MODEL_PATTERNS = [
/deepseek-r1/i,
/deepseek-reasoner/i,
/deepseek-chat/i,
/deepseek[-/]v4[-.](flash|pro)/i,
/deepseek[-/]v4[-.](flash|pro)(-free)?/i,
/zen\/deepseek-v4/i,
Comment on lines +48 to +49

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.

medium

The regex DEEPSEEK_V4_MODEL_PATTERN on line 59 also needs to be updated to match these new -free and zen/ variants. Currently, it is defined as /deepseek[-/]v4[-.](flash|pro)/i, which means isDeepSeekReasoningModel will return false for these new variants.

/kimi-k2/i,
/qwq/i,
/qwen.*think/i,
Expand Down
1 change: 1 addition & 0 deletions src/lib/versionManager/binaryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export async function getInstalledVersions(dataDir?: string): Promise<string[]>
return entries
.filter(
(e) =>
typeof e === "string" &&
e.startsWith("cliproxyapi-") &&
fsSync.statSync(path.join(/* turbopackIgnore: true */ binDir, e)).isDirectory()
)
Comment on lines 163 to 168

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.

medium

If fsSync.statSync throws an error (for example, due to a broken symlink, permission issue, or if a file is deleted during execution), the entire getInstalledVersions function will fail and return []. Wrapping the statSync call in a try-catch block makes the filter robust against individual file errors.

      .filter((e) => {
        if (typeof e !== "string" || !e.startsWith("cliproxyapi-")) {
          return false;
        }
        try {
          return fsSync.statSync(path.join(/* turbopackIgnore: true */ binDir, e)).isDirectory();
        } catch {
          return false;
        }
      })

Expand Down