Skip to content

feat: add OrcaRouter provider support and update context windows:#219

Merged
yashdev9274 merged 4 commits into
mainfrom
supercode-cli
Jul 20, 2026
Merged

feat: add OrcaRouter provider support and update context windows:#219
yashdev9274 merged 4 commits into
mainfrom
supercode-cli

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Description

  • Introduced OrcaRouterService for handling interactions with the OrcaRouter API.
  • Updated context windows to include new models from OrcaRouter and adjusted pricing for existing models.
  • Enhanced provider management to support OrcaRouter in connection and model selection processes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • bun test passes
  • bun run typecheck passes
  • bun run lint passes (if applicable)

Checklist:

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Summary by CodeRabbit

  • New Features
    • Added OrcaRouter as a supported AI provider, including API-key connection and an expanded model picker (with automatic model selection).
    • Added streaming and tool-enabled interactions for OrcaRouter.
  • Improvements
    • Updated model pricing/labels, provider display colors, and usage tracking for new OrcaRouter-related models.
    • Expanded context-window mappings for additional model variants.
  • Content
    • Updated partnerships pages with tweet embeds where available, improved partner branding/styling, and added new partnership entries (including OrcaRouter).
    • Added a client-side 404 page experience.

- Introduced OrcaRouterService for handling interactions with the OrcaRouter API.
- Updated context windows to include new models from OrcaRouter and adjusted pricing for existing models.
- Enhanced provider management to support OrcaRouter in connection and model selection processes.
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
supercli Ready Ready Preview, Comment Jul 20, 2026 7:19am
supercli-client Ready Ready Preview, Comment Jul 20, 2026 7:19am
supercli-docs Ready Ready Preview, Comment Jul 20, 2026 7:19am

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 54259b3d-fae6-4b44-ac4f-2ec8eabb5cc9

📥 Commits

Reviewing files that changed from the base of the PR and between 91fcb29 and da50dc9.

⛔ Files ignored due to path filters (4)
  • apps/web/public/ddp-logo.png is excluded by !**/*.png
  • apps/web/public/mergedev.jpeg is excluded by !**/*.jpeg
  • apps/web/public/orcarouter-logo.jpg is excluded by !**/*.jpg
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • apps/web/app/(pages)/partnerships/[company]/page.tsx
  • apps/web/app/(pages)/partnerships/page.tsx
  • apps/web/app/not-found.tsx
  • apps/web/components/homepage/hero.tsx
  • apps/web/components/homepage/partnerships-section.tsx
  • apps/web/data/partnerships.ts
  • apps/web/package.json

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

Adds OrcaRouter as a configurable, selectable AI provider with streaming and tool-aware request handling. It also registers model metadata and key mappings, expands partnership content and embeds, updates homepage branding, and introduces an animated 404 page.

Changes

OrcaRouter integration

Layer / File(s) Summary
Configuration and model metadata
apps/supercode-cli/server/src/config/orcarouter.config.ts, apps/supercode-cli/server/src/lib/cli-config.ts, apps/supercode-cli/server/src/lib/pricing.ts, apps/supercode-cli/server/src/cli/ai/context-windows.ts, apps/supercode-cli/server/package.json
Adds OrcaRouter environment settings, key mappings, context windows, pricing/display metadata, and a package version update.
OrcaRouter streaming service
apps/supercode-cli/server/src/cli/ai/orcarouter-service.ts
Adds OpenAI-compatible streaming, tool-step handling, usage tracking, gateway error handling, cleanup, and message aggregation.
Provider registration and key resolution
apps/supercode-cli/server/src/cli/ai/provider.ts
Registers orcarouter, resolves direct and BYOK keys, and delegates requests to OrcaRouterService.
CLI provider and model selection
apps/supercode-cli/server/src/cli/commands/slashCommands/connect.ts, apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts
Adds OrcaRouter to connection choices, model sections, selectable models, and provider display formatting.

Partnership and site experience

Layer / File(s) Summary
Partnership data and detail page
apps/web/data/partnerships.ts, apps/web/app/(pages)/partnerships/[company]/page.tsx, apps/web/package.json
Extends partner metadata, adds mergedev, dodopayments, and orcarouter records, renders optional Tweet embeds and website links, and updates the CTA route.
Partnership listing and homepage presentation
apps/web/app/(pages)/partnerships/page.tsx, apps/web/components/homepage/partnerships-section.tsx, apps/web/components/homepage/hero.tsx
Updates partnership copy and applies partner-specific logo styling while changing the displayed version label.
Animated not-found page
apps/web/app/not-found.tsx
Adds an animated client-side 404 page showing the current pathname and a delayed return-home link.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant Provider as createProvider
  participant Service as OrcaRouterService
  participant Gateway as OrcaRouter gateway
  CLI->>Provider: Select orcarouter
  Provider->>Service: Create service and send messages
  Service->>Gateway: Stream chat request
  Gateway-->>Service: Return text, tool steps, usage, and finish reason
  Service-->>CLI: Return content and metadata
Loading

Possibly related PRs

Poem

A rabbit hops through streams of light,
OrcaRouter makes models take flight.
Tools and tokens dance along,
New partners join the song.
A 404 moon guides the way home.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding OrcaRouter provider support and updating context windows.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch supercode-cli

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
apps/supercode-cli/server/src/cli/ai/orcarouter-service.ts (2)

45-48: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Fixed 120s timeout may be too tight for multi-step tool sessions.

stopWhen: stepCountIs(8) allows up to 8 LLM/tool round-trips (file reads, run_command, web_search, etc.), but the whole call is bounded by a single hardcoded 120s streamTimeout. A legitimate multi-step tool session can easily exceed 120s, causing premature abort and a failed/truncated response rather than a graceful completion.

Consider scaling the timeout with tool usage (e.g., reset/extend on each onStepFinish) or making it configurable.

Also applies to: 257-259

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/supercode-cli/server/src/cli/ai/orcarouter-service.ts` around lines 45 -
48, Update the stream timeout handling around streamAbortController and
streamTimeout so legitimate multi-step sessions are not prematurely aborted by a
fixed 120-second limit. Make the timeout configurable or extend/reset it after
each completed tool/LLM step, integrating the adjustment with the existing
onStepFinish flow while preserving the caller’s abort signal behavior.

57-93: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Significant duplication between the no-tools and tools branches.

Both branches independently duplicate the recordUsage/computeCost call and the { content, finishReason, usage } return shape. Consider extracting a shared finalize(result) helper to reduce duplication and the risk of the two paths drifting apart on future changes (e.g., the maxTokens fix above would need to be applied twice).

Also applies to: 95-241

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/supercode-cli/server/src/cli/ai/orcarouter-service.ts` around lines 57 -
93, Extract the shared usage recording and response construction from the
no-tools and tools branches into a local finalize helper near the main streaming
logic. Have finalize await the result’s finishReason and usage, call recordUsage
with computeCost using the existing model and token fields, and return the
common { content, finishReason, usage } shape; update both branches to use it
while preserving their distinct streaming behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts`:
- Around line 173-185: The OrcaRouter model costs in the model list already
include the “x” suffix, while the consumer formats them with another suffix.
Update the cost handling between the model entries and the consumer in
connect.ts so each displayed hint contains exactly one “x”, preserving the
existing numeric cost values and model selection behavior.
- Around line 182-183: Update the DeepSeek entries in the model list near the
existing OrcaRouter definitions to use the current DeepSeek model IDs instead of
the deprecated aliases, and revise their labels, costs, and
descriptions/provider metadata to match the current model offerings. Preserve
the existing entry structure and OrcaRouter grouping.

In `@apps/supercode-cli/server/src/config/orcarouter.config.ts`:
- Around line 1-6: Update both occurrences of the hardcoded maxOutputTokens
value in the orcarouter service to use orcarouterConfig.maxTokens, so
ORCAROUTER_MAX_TOKENS and its default are honored consistently.

In `@apps/supercode-cli/server/src/lib/pricing.ts`:
- Around line 32-37: Add a pricing entry in the pricing map for OrcaRouter’s
default model, openai/gpt-4o-mini, using the same pricing values as its upstream
model. Ensure requests resolved through providerMeta.orcarouter.defaultModel or
orcarouterConfig.model receive nonzero cost calculation instead of falling back
to the orcarouter/auto zero-cost entry.

---

Nitpick comments:
In `@apps/supercode-cli/server/src/cli/ai/orcarouter-service.ts`:
- Around line 45-48: Update the stream timeout handling around
streamAbortController and streamTimeout so legitimate multi-step sessions are
not prematurely aborted by a fixed 120-second limit. Make the timeout
configurable or extend/reset it after each completed tool/LLM step, integrating
the adjustment with the existing onStepFinish flow while preserving the caller’s
abort signal behavior.
- Around line 57-93: Extract the shared usage recording and response
construction from the no-tools and tools branches into a local finalize helper
near the main streaming logic. Have finalize await the result’s finishReason and
usage, call recordUsage with computeCost using the existing model and token
fields, and return the common { content, finishReason, usage } shape; update
both branches to use it while preserving their distinct streaming behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68e191dc-12e2-4e64-bad4-7b0a1d5b4023

📥 Commits

Reviewing files that changed from the base of the PR and between a962651 and e8072ba.

📒 Files selected for processing (9)
  • apps/supercode-cli/server/package.json
  • apps/supercode-cli/server/src/cli/ai/context-windows.ts
  • apps/supercode-cli/server/src/cli/ai/orcarouter-service.ts
  • apps/supercode-cli/server/src/cli/ai/provider.ts
  • apps/supercode-cli/server/src/cli/commands/slashCommands/connect.ts
  • apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts
  • apps/supercode-cli/server/src/config/orcarouter.config.ts
  • apps/supercode-cli/server/src/lib/cli-config.ts
  • apps/supercode-cli/server/src/lib/pricing.ts

Comment on lines +173 to +185
{ value: "openai/gpt-4o-mini", label: "GPT-4o Mini", provider: "orcarouter", cost: "0.5x", desc: "Cheap & fast" },
{ value: "openai/gpt-4o", label: "GPT-4o", provider: "orcarouter", cost: "4x", desc: "OpenAI flagship" },
{ value: "openai/gpt-4.1", label: "GPT-4.1", provider: "orcarouter", cost: "3x", desc: "Latest GPT" },
{ value: "openai/o3-mini", label: "o3-mini", provider: "orcarouter", cost: "3x", desc: "Reasoning mini" },
{ value: "openai/o4-mini", label: "o4-mini", provider: "orcarouter", cost: "3x", desc: "Reasoning v4 mini" },
{ value: "anthropic/claude-sonnet-4.6", label: "Claude Sonnet 4.6", provider: "orcarouter", cost: "12x", desc: "Latest sonnet" },
{ value: "anthropic/claude-opus-4.7", label: "Claude Opus 4.7", provider: "orcarouter", cost: "40x", desc: "Deep reasoning" },
{ value: "google/gemini-2.5-flash", label: "Gemini 2.5 Flash", provider: "orcarouter", cost: "2x", desc: "Smart & fast" },
{ value: "google/gemini-2.5-pro", label: "Gemini 2.5 Pro", provider: "orcarouter", cost: "4x", desc: "Deep reasoning" },
{ value: "deepseek/deepseek-chat", label: "DeepSeek Chat", provider: "orcarouter", cost: "0.5x", desc: "Via OrcaRouter" },
{ value: "deepseek/deepseek-reasoner", label: "DeepSeek Reasoner", provider: "orcarouter", cost: "1.5x", desc: "Reasoning model" },
{ value: "grok/grok-4-fast-reasoning", label: "Grok 4 Fast", provider: "orcarouter", cost: "5x", desc: "Fast reasoning" },
{ value: "orcarouter/auto", label: "OrcaRouter Auto", provider: "orcarouter", cost: "0x", desc: "Auto-pick cheapest" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid double-appending the cost suffix.

These entries store values such as "0.5x" and "4x", but connect.ts formats hints as ${m.cost}x, producing "0.5xx" and "4xx" for OrcaRouter models. Normalize the cost representation or stop appending the suffix in the consumer.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts` around
lines 173 - 185, The OrcaRouter model costs in the model list already include
the “x” suffix, while the consumer formats them with another suffix. Update the
cost handling between the model entries and the consumer in connect.ts so each
displayed hint contains exactly one “x”, preserving the existing numeric cost
values and model selection behavior.

Comment on lines +182 to +183
{ value: "deepseek/deepseek-chat", label: "DeepSeek Chat", provider: "orcarouter", cost: "0.5x", desc: "Via OrcaRouter" },
{ value: "deepseek/deepseek-reasoner", label: "DeepSeek Reasoner", provider: "orcarouter", cost: "1.5x", desc: "Reasoning model" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the surrounding code in the target file
file="apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts"
wc -l "$file"
sed -n '150,210p' "$file"

# Find other DeepSeek references in the repo
rg -n 'deepseek/(deepseek-chat|deepseek-reasoner)|DeepSeek' apps/supercode-cli/server/src/cli/commands/slashCommands -S

Repository: yashdev9274/supercli

Length of output: 7507


🌐 Web query:

OrcaRouter DeepSeek legacy aliases deepseek/deepseek-chat deepseek/deepseek-reasoner deprecation July 24 2026 current model IDs

💡 Result:

DeepSeek has scheduled the permanent deprecation of its legacy API model aliases, deepseek/deepseek-chat and deepseek/deepseek-reasoner, for July 24, 2026, at 15:59 UTC [1][2][3]. After this deadline, requests using these legacy identifiers will no longer be accepted by the API and will result in errors [1][2][3]. Migration and Replacement To maintain service, users must update their routing configurations, provider presets, and SDK calls to use the current official DeepSeek V4 model identifiers [1][4][2]. The legacy aliases currently map to the V4-Flash engine [5][2][3], but this backward compatibility ends on July 24 [1][3]. The recommended replacements are [4][3]: 1. deepseek-v4-flash: For general production use. This replaces deepseek-chat [4][3]. 2. deepseek-v4-flash (with reasoning): To replicate the behavior of the deprecated deepseek-reasoner, use deepseek-v4-flash and include the parameter "thinking": {"type": "enabled"} in your request body [4][3]. 3. deepseek-v4-pro: A flagship option for complex reasoning tasks and high-capability workloads, which also supports a 1M context window [4][6]. Action Required Operators of AI gateways (such as OrcaRouter) and applications should perform an immediate audit of all codebase references, environment variables, and infrastructure-as-code configurations to replace these strings [1][2][3]. No grace period is expected; requests failing to migrate before the specified cutoff will cease to function [1][2][3].

Citations:


🌐 Web query:

official DeepSeek docs deprecate deepseek-chat deepseek-reasoner deepseek-v4-flash deepseek-v4-pro July 24 2026

💡 Result:

The legacy DeepSeek API model identifiers deepseek-chat and deepseek-reasoner are officially scheduled to be deprecated and fully retired on July 24, 2026, at 15:59 UTC [1][2][3]. After this deadline, any API requests made using these legacy names will fail [4][5][6]. Official DeepSeek documentation clarifies that the identifiers deepseek-v4-flash and deepseek-v4-pro are not being deprecated [1]. Instead, they are the current, active models that users must migrate to [7][2]. For migration purposes, the legacy aliases map to the following functionality within the new model architecture: - deepseek-chat: Corresponds to the non-thinking mode of deepseek-v4-flash [1][3]. - deepseek-reasoner: Corresponds to the thinking mode of deepseek-v4-flash [1][3]. Users are advised to update their API requests to use deepseek-v4-flash or deepseek-v4-pro, adjusting thinking mode configurations as required via request parameters rather than model name selection [1][6]. The API base URL and authentication methods remain unchanged [2][5][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts"

# Show nearby DeepSeek entries across all providers
rg -n 'deepseek-v4-flash|deepseek-v4-pro|deepseek-chat|deepseek-reasoner|deepseek-v3|deepseek-r1' "$file" -S

# Inspect the provider sections around the relevant entries
sed -n '40,110p' "$file"
sed -n '140,190p' "$file"

Repository: yashdev9274/supercli

Length of output: 13937


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find where the selected model value is consumed
rg -n 'currentModel|stored\?\.model|modelPicker|MODELS|provider: "orcarouter"|provider === "orcarouter"|model:' apps/supercode-cli/server/src/cli/commands/slashCommands -S

# Inspect the selection/request path around the model value
sed -n '440,560p' apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts

Repository: yashdev9274/supercli

Length of output: 8641


Replace the deprecated DeepSeek aliases in OrcaRouter

apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts:182-183 still uses deepseek/deepseek-chat and deepseek/deepseek-reasoner; those legacy IDs stop working after July 24, 2026. Swap them to the current DeepSeek IDs and update the cost/metadata to match.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/supercode-cli/server/src/cli/commands/slashCommands/model.ts` around
lines 182 - 183, Update the DeepSeek entries in the model list near the existing
OrcaRouter definitions to use the current DeepSeek model IDs instead of the
deprecated aliases, and revise their labels, costs, and descriptions/provider
metadata to match the current model offerings. Preserve the existing entry
structure and OrcaRouter grouping.

Comment on lines +1 to +6
export const orcarouterConfig = {
get apiKey() { return process.env.ORCAROUTER_API_KEY || "" },
get model() { return process.env.ORCAROUTER_MODEL || "openai/gpt-4o-mini" },
baseUrl: "https://api.orcarouter.ai/v1",
get maxTokens() { return Number(process.env.ORCAROUTER_MAX_TOKENS) || 128000 },
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

maxTokens is defined but never consumed.

orcarouterConfig.maxTokens reads ORCAROUTER_MAX_TOKENS (default 128000), but orcarouter-service.ts never references it — it hardcodes maxOutputTokens: 8192 instead. Setting ORCAROUTER_MAX_TOKENS has no effect, which is misleading for anyone configuring it.

🔧 Proposed fix
-          ...(!HIGH_VALUE_MODELS.includes(this.modelName) ? { maxOutputTokens: 8192 } : {}),
+          ...(!HIGH_VALUE_MODELS.includes(this.modelName) ? { maxOutputTokens: orcarouterConfig.maxTokens } : {}),

(apply to both occurrences in orcarouter-service.ts)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/supercode-cli/server/src/config/orcarouter.config.ts` around lines 1 -
6, Update both occurrences of the hardcoded maxOutputTokens value in the
orcarouter service to use orcarouterConfig.maxTokens, so ORCAROUTER_MAX_TOKENS
and its default are honored consistently.

Comment on lines +32 to +37
"anthropic/claude-sonnet-4.6": { inputPrice: 3.00, outputPrice: 15.00, cachedPrice: 0.30 },
"anthropic/claude-opus-4.7": { inputPrice: 5.00, outputPrice: 25.00, cachedPrice: 0.50 },
"deepseek/deepseek-chat": { inputPrice: 0.15, outputPrice: 0.60, cachedPrice: 0 },
"deepseek/deepseek-reasoner": { inputPrice: 0.50, outputPrice: 2.00, cachedPrice: 0 },
"grok/grok-4-fast-reasoning": { inputPrice: 1.00, outputPrice: 5.00, cachedPrice: 0 },
"orcarouter/auto": { inputPrice: 0, outputPrice: 0, cachedPrice: 0 },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n '"openai/gpt-4o-mini"|gpt-4o-mini' apps/supercode-cli/server/src/lib/pricing.ts apps/supercode-cli/server/src/cli/ai/context-windows.ts

Repository: yashdev9274/supercli

Length of output: 158


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== pricing.ts outline ==\n'
ast-grep outline apps/supercode-cli/server/src/lib/pricing.ts --view expanded || true

printf '\n== provider.ts outline ==\n'
ast-grep outline apps/supercode-cli/server/src/lib/provider.ts --view expanded || true

printf '\n== pricing.ts relevant lines ==\n'
cat -n apps/supercode-cli/server/src/lib/pricing.ts | sed -n '1,220p'

printf '\n== provider.ts relevant lines ==\n'
cat -n apps/supercode-cli/server/src/lib/provider.ts | sed -n '1,260p'

Repository: yashdev9274/supercli

Length of output: 5766


🏁 Script executed:

#!/bin/bash
set -euo pipefail
printf '\n== pricing.ts outline ==\n'
ast-grep outline apps/supercode-cli/server/src/lib/pricing.ts --view expanded || true
printf '\n== provider.ts outline ==\n'
ast-grep outline apps/supercode-cli/server/src/lib/provider.ts --view expanded || true
printf '\n== pricing.ts relevant lines ==\n'
cat -n apps/supercode-cli/server/src/lib/pricing.ts | sed -n '1,220p'
printf '\n== provider.ts relevant lines ==\n'
cat -n apps/supercode-cli/server/src/lib/provider.ts | sed -n '1,260p'

Repository: yashdev9274/supercli

Length of output: 5766


🏁 Script executed:

#!/bin/bash
set -euo pipefail
cat -n apps/supercode-cli/server/src/lib/pricing.ts | sed -n '1,220p'
printf '\n----\n'
cat -n apps/supercode-cli/server/src/lib/provider.ts | sed -n '1,260p'

Repository: yashdev9274/supercli

Length of output: 5130


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n 'orcarouter|defaultModel|lookupPricing|computeCost' apps/supercode-cli/server/src/lib

Repository: yashdev9274/supercli

Length of output: 1044


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== gpt-4o-mini references ==\n'
rg -n 'gpt-4o-mini|openai/gpt-4o-mini' .

printf '\n== OrcaRouter references ==\n'
rg -n 'orcarouter|OrcaRouter|defaultModel|providerMeta' apps/supercode-cli/server/src

Repository: yashdev9274/supercli

Length of output: 10449


Add pricing for OrcaRouter’s default model. orcarouter/auto doesn’t cover providerMeta.orcarouter.defaultModel / orcarouterConfig.model (openai/gpt-4o-mini), so default OrcaRouter requests still get logged with costUsd: 0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/supercode-cli/server/src/lib/pricing.ts` around lines 32 - 37, Add a
pricing entry in the pricing map for OrcaRouter’s default model,
openai/gpt-4o-mini, using the same pricing values as its upstream model. Ensure
requests resolved through providerMeta.orcarouter.defaultModel or
orcarouterConfig.model receive nonzero cost calculation instead of falling back
to the orcarouter/auto zero-cost entry.

- Replaced outdated models with new entries for Claude Opus and Sonnet series.
- Added additional models from Grok, DeepSeek, and Kimi, enhancing the variety of options available.
- Removed cost details for clarity and consistency across model entries.
- Bumped supercode-cli version to 0.1.79.
- Added react-tweet dependency for displaying tweets.
- Introduced a new NotFound page for better user experience on 404 errors.
- Updated partnerships section to include new partner details and logos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant