Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(qoder): revert out-of-scope PR #1021 changes that broke qoder tests

diegosouzapweec2db05900f
diff --git a/open-sse/executors/qoder.ts b/open-sse/executors/qoder.ts
index c9c8009d7d..77139b821f 100644
--- a/open-sse/executors/qoder.ts
+++ b/open-sse/executors/qoder.ts
@@ -24,20 +24,7 @@ export class QoderExecutor extends BaseExecutor {
super("qoder", PROVIDERS.qoder);
}
- buildHeaders(_credentials: ProviderCredentials, stream = true): Record<string, string> {
- const headers: Record<string, string> = { "Content-Type": "application/json" };
- if (stream) headers["Accept"] = "text/event-stream";
- return headers;
- }
-
- async execute({
- model,
- body,
- stream: _stream,
- credentials,
- signal,
- upstreamExtraHeaders,
- }: ExecuteInput) {
+ async execute({ model, body, stream, credentials, signal, upstreamExtraHeaders }: ExecuteInput) {
const token = getAuthToken(credentials);
if (!token) {
diff --git a/open-sse/services/contextManager.ts b/open-sse/services/contextManager.ts
index 20e98e3fd2..a899a141b5 100644
--- a/open-sse/services/contextManager.ts
+++ b/open-sse/services/contextManager.ts
@@ -12,7 +12,7 @@ import { getModelContextLimit } from "../../src/lib/modelsDevSync";
const DEFAULT_LIMITS: Record<string, number> = {
claude: 200000,
openai: 128000,
- gemini: 1048576,
+ gemini: 1000000,
codex: 400000,
default: 128000,
};
diff --git a/open-sse/services/qoderCli.ts b/open-sse/services/qoderCli.ts
index bdc1de5b7b..ca8e7be1a2 100644
--- a/open-sse/services/qoderCli.ts
+++ b/open-sse/services/qoderCli.ts
@@ -1,5 +1,8 @@
+import { spawn } from "child_process";
import crypto from "crypto";
+const DEFAULT_TIMEOUT_MS = 45_000;
+const DEFAULT_MAX_TURNS = "1";
const QODER_DEFAULT_MODEL = "qoder-rome-30ba3b";
export const QODER_STATIC_MODELS = [
@@ -21,6 +24,26 @@ export const QODER_STATIC_MODELS = [
type JsonRecord = Record<string, unknown>;
+type QoderCliRunOptions = {
+ token: string;
+ prompt: string;
+ stream: boolean;
+ model?: string | null;
+ workspace?: string | null;
+ command?: string | null;
+ signal?: AbortSignal | null;
+ timeoutMs?: number;
+};
+
+type QoderCliRunResult = {
+ ok: boolean;
+ code: number | null;
+ stdout: string;
+ stderr: string;
+ timedOut: boolean;
+ error: string | null;
+};
+
type QoderCliFailure = {
status: number;
message: string;
@@ -297,10 +320,6 @@ export function parseQoderCliFailure(stderrText: string, stdoutText = ""): Qoder
return { status: 504, message: combined, code: "timeout" };
}
- if (normalized.includes("command not found") || normalized.includes("no such file")) {
- return { status: 503, message: combined, code: "runtime_error" };
- }
-
return { status: 502, message: combined, code: "upstream_error" };
}