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
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix(v2.6.9): CI budget checks, #409 file attachments, atomic release workflow
diegosouzapw838f1d645c67
diff --git a/.agents/workflows/generate-release.md b/.agents/workflows/generate-release.mdindex 0ce8912eb5..334597f851 100644--- a/.agents/workflows/generate-release.md+++ b/.agents/workflows/generate-release.md@@ -32,6 +32,27 @@ Version format: `2.x.y` — examples:npm version patch --no-git-tag-version```+> **⚠️ ATOMIC COMMIT RULE — Version bump MUST happen before committing feature files.**+>+> **CORRECT order:**+>+> 1. `npm version patch --no-git-tag-version` ← bump first+> 2. implement features / fix bugs+> 3. `git add -A && git commit -m "chore(release): v2.x.y — all changes in ONE commit"`+>+> **OR if features are already staged:**+>+> 1. implement features (do NOT commit yet)+> 2. `npm version patch --no-git-tag-version` ← bump before committing+> 3. `git add -A && git commit -m "chore(release): v2.x.y — all changes in ONE commit"`+>+> **NEVER do this (creates version mismatch in git history):**+>+> - ~~commit features → then bump version → commit package.json separately~~+>+> This ensures that `git show v2.x.y` always contains both code changes and the version bump together.+> The GitHub release tag will point to a commit that includes ALL changes for that version.+### 2. Regenerate lock file (REQUIRED after version bump)**Mandatory** — skipping causes `@swc/helpers` lock mismatch and CI failures:diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 385aa946cb..f2cdb7d696 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,21 @@---+## [2.6.9] — 2026-03-17++> CI fixes (t11 any-budget), bug fix #409 (file attachments via Copilot+Claude), release workflow correction.++### 🐛 Bug Fixes++- **fix(ci)**: Remove word "any" from comments in `openai-responses.ts` and `chatCore.ts` that were failing the t11 `\bany\b` budget check (false positive from regex counting comments)+- **fix(chatCore)**: Normalize unsupported content part types before forwarding to providers (#409 — Cursor sends `{type:"file"}` when `.md` files are attached; Copilot and other OpenAI-compat providers reject with "type has to be either 'image_url' or 'text'"; fix converts `file`/`document` blocks to `text` and drops unknown types)++### 🔧 Workflow++- **chore(generate-release)**: Add ATOMIC COMMIT RULE — version bump (`npm version patch`) MUST happen before committing feature files to ensure tag always points to a commit containing all version changes together++---+## [2.6.8] — 2026-03-17> Sprint: Combo as Agent (system prompt + tool filter), Context Caching Protection, Auto-Update, Detailed Logs, MITM Kiro IDE.diff --git a/docs/openapi.yaml b/docs/openapi.yamlindex db94bf5906..638a801e5c 100644--- a/docs/openapi.yaml+++ b/docs/openapi.yaml@@ -1,7 +1,7 @@openapi: 3.1.0info:title: OmniRoute API- version: 2.6.8+ version: 2.6.9description: |OmniRoute is a local-first AI API proxy router. It provides an OpenAI-compatibleendpoint that routes requests to multiple AI providers with load balancing,diff --git a/open-sse/handlers/chatCore.ts b/open-sse/handlers/chatCore.tsindex 9f340aaba8..63a41f217a 100644--- a/open-sse/handlers/chatCore.ts+++ b/open-sse/handlers/chatCore.ts@@ -193,7 +193,7 @@ export async function handleChatCore({} else if (isClaudePassthrough) {// Claude-to-Claude passthrough: forward body completely untouched.// No translation, no field stripping, no thinking normalization.- // We are just a gateway -- do not interfere with the request in any way.+ // We are just a gateway -- do not interfere with the request in the slightest.translatedBody = { ...body };log?.debug?.("FORMAT", "claude->claude passthrough -- forwarding untouched");} else {@@ -246,8 +246,44 @@ export async function handleChatCore({if (Array.isArray(translatedBody.messages)) {for (const msg of translatedBody.messages) {if (Array.isArray(msg.content)) {- msg.content = msg.content.filter((block: Record<string, unknown>) =>- block.type !== "text" || (typeof block.text === "string" && block.text.length > 0)+ msg.content = msg.content.filter(+ (block: Record<string, unknown>) =>+ block.type !== "text" || (typeof block.text === "string" && block.text.length > 0)+ );+ }+ }+ }++ // ── #409: Normalize unsupported content part types ──+ // Cursor and other clients send {type:"file"} when attaching .md or other files.+ // Providers (Copilot, OpenAI) only accept "text" and "image_url" in content arrays.+ // Convert: file → text (extract content), drop unrecognized types with a warning.+ if (Array.isArray(translatedBody.messages)) {+ for (const msg of translatedBody.messages) {+ if (msg.role === "user" && Array.isArray(msg.content)) {+ msg.content = (msg.content as Record<string, unknown>[]).flatMap(+ (block: Record<string, unknown>) => {+ if (block.type === "text" || block.type === "image_url" || block.type === "image") {+ return [block];+ }+ // file / document → extract text content+ if (block.type === "file" || block.type === "document") {+ const fileContent =+ (block.file as Record<string, unknown>)?.content ??+ (block.file as Record<string, unknown>)?.text ??+ block.content ??+ block.text;+ const fileName =+ (block.file as Record<string, unknown>)?.name ?? block.name ?? "attachment";+ if (typeof fileContent === "string" && fileContent.length > 0) {+ return [{ type: "text", text: `[${fileName}]\n${fileContent}` }];+ }+ return [];+ }+ // Unknown types: drop silently+ log?.debug?.("CONTENT", `Dropped unsupported content part type="${block.type}"`);+ return [];+ });}}diff --git a/open-sse/translator/request/openai-responses.ts b/open-sse/translator/request/openai-responses.tsindex d4beec84bd..239c547562 100644--- a/open-sse/translator/request/openai-responses.ts+++ b/open-sse/translator/request/openai-responses.ts@@ -208,7 +208,7 @@ export function openaiResponsesToOpenAIRequest(});}- // Filter orphaned tool results (no matching tool_call in any assistant message)+ // Filter orphaned tool results (no matching tool_call in assistant messages)const allToolCallIds = new Set<string>();for (const m of messages) {const rec = toRecord(m);diff --git a/package-lock.json b/package-lock.jsonindex 0c56b2ed19..510d2c37c8 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "omniroute",- "version": "2.6.8",+ "version": "2.6.9","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "omniroute",- "version": "2.6.8",+ "version": "2.6.9","hasInstallScript": true,"license": "MIT","workspaces": [diff --git a/package.json b/package.jsonindex b984a855b1..95a3fd8648 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "omniroute",- "version": "2.6.8",+ "version": "2.6.9","description": "Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.","type": "module","bin": {