Skip to content

feat(provider): add Nexforce Router - #3498

Open
fernandovitti wants to merge 1 commit into
different-ai:devfrom
fernandovitti:feat/nexforce-provider
Open

feat(provider): add Nexforce Router#3498
fernandovitti wants to merge 1 commit into
different-ai:devfrom
fernandovitti:feat/nexforce-provider

Conversation

@fernandovitti

Copy link
Copy Markdown

Value proposition

This PR adds Nexforce Router — Latin America's largest AI inference router — so OpenWork users get one API key that reaches Anthropic, OpenAI, Google, DeepSeek, Moonshot, Zhipu, and Cloudflare Workers AI, with automatic fallback and per-key cost control.

OpenWork already supports any OpenAI-compatible provider via config (base URL + key). Nexforce Router is exactly that shape, so the integration is a turnkey catalog entry: point OpenWork at https://router.nexforce.ai/v1, drop in your NEXFORCE_API_KEY, and every routed model appears in the model picker — including nexforce/smart-route, which lets the router pick an equivalent model per request while preserving required capabilities.

Regional differentiator

Nexforce Router is built for Latin America. Billing and compliance are handled locally for each country in the region: invoicing, taxes, and payment infrastructure are managed in-country, so teams get compliant, locally-issued invoices without the FX and foreign-procurement friction of paying an overseas provider. Cost control is per API key — fallback chains, rate limits, and spend caps configured per key, with X-Nexforce-Requested-Model / X-Nexforce-Served-Model response headers disclosing exactly which model answered and what it cost.

What changed

  • packages/docs/cloud/share-with-your-team/custom-llm-provider.mdx — new "Functional example: Nexforce Router" section with a ready-to-paste provider definition (mirrors the existing Infron gateway example).
  • packages/docs/start-here/connect-your-stack/add-a-custom-llm.mdx — desktop config example for solo use: nexforce provider block with @ai-sdk/openai-compatible, base URL, and NEXFORCE_API_KEY.
  • apps/app/src/react-app/design-system/provider-logo-src.ts — brand logo catalog entry so the Nexforce Router mark resolves in the model picker instead of falling back to a monogram.

How to configure

Set the env var:

export NEXFORCE_API_KEY=nfc_...

Then add the provider to your workspace opencode.json:

{
  "provider": {
    "nexforce": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Nexforce Router",
      "options": {
        "baseURL": "https://router.nexforce.ai/v1",
        "apiKey": "{env:NEXFORCE_API_KEY}"
      },
      "models": {
        "nexforce/smart-route": { "name": "Nexforce Smart Route" },
        "anthropic/claude-sonnet-4-6": { "name": "Claude Sonnet 4.6" },
        "deepseek/deepseek-v4-flash": { "name": "DeepSeek V4 Flash" }
      }
    }
  }
}

Grab a key at https://marketplace.nexforce.ai/workspace/ai-gateway/ai-gateway-keys

Verification done

  • Live /v1/models listing: GET https://router.nexforce.ai/v1/models (public, no key) returned the full catalog (139 models across Anthropic, OpenAI, Google, DeepSeek, Moonshot, Zhipu, and Cloudflare Workers AI).
  • Live chat roundtrip against deepseek/deepseek-v4-flash: HTTP 200 with a real completion, confirming X-Nexforce-Requested-Model: deepseek/deepseek-v4-flash and X-Nexforce-Served-Model: deepseek-v4-flash transparency headers.
  • Tool calling: a function-call request returned finish_reason: tool_calls with valid arguments, confirming agentic/tool-calling support.
  • Engine load: with a temp HOME + opencode.json containing the documented nexforce provider block, the real OpenCode engine listed all six configured Nexforce models (opencode models).
  • Typecheck: pnpm --filter @openwork/app typecheck passes.
  • Tests: apps/app unit tests use bun test, and bun is not available in this environment, so the provider-icon test could not be executed here; the one-line logo-map change is covered by app typecheck. Docs changes carry no test harness. Please run pnpm --filter @openwork/app test in CI.

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@fernandovitti is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, v0 Aug 4, 2026 11:27am

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