skillfed

9router-chat

9router-chat lets you send chat and code generation requests through 9Router's multi-provider routing layer, supporting both OpenAI and Anthropic API formats with streaming enabled. Built-in fallback combos automatically switch between providers, letting you discover available models and their capabilities on demand.

9router-chat routes chat and code generation requests through 9Router to multiple LLM providers with streaming and automatic fallback.

AI-generated summary based on this skill's SKILL.md

23,810 4,062 MIT updated by decolua

Install

decolua/9router/9router-chat · repository language: JavaScript

git clone https://github.com/decolua/9router
cp -r 9router/skills/9router-chat ~/.claude/skills/9router-chat
npx skillfed install decolua/9router/9router-chat

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is 9router-chat and how does it route requests?

9router-chat is an MIT-licensed skill that lets you send chat and code generation requests through 9Router's multi-provider routing layer. It supports both OpenAI and Anthropic API formats with streaming enabled, automatically routing your prompts to available LLM providers and handling fallback between them when needed.

Can I stream responses from multiple LLMs using 9router-chat?

Yes. 9router-chat streams LLM responses with automatic fallback between OpenAI and Anthropic. When your primary provider is unavailable or slow, 9router-chat seamlessly switches to an alternative provider, ensuring your streaming chat completions continue without interruption.

How do I send prompts to OpenAI via 9router-chat?

9router-chat integrates OpenAI SDK or Anthropic API format into applications through 9Router. You can send prompts using the standard chat completions format, and 9router-chat routes them to OpenAI or other configured providers. The skill handles authentication and provider selection automatically.

What models and capabilities can 9router-chat discover?

9router-chat lets you discover available models and their capabilities via 9Router metadata. You can query which LLM providers are active, what models they offer (like GPT-4o or Claude Opus), and their current status—enabling you to choose the best provider for your use case dynamically.

Can 9router-chat generate code with provider redundancy?

Yes. 9router-chat supports code generation using combo models with provider redundancy. You can summarize text or generate code through multiple providers simultaneously or sequentially, with built-in fallback ensuring your requests complete even if one provider fails.

How do I integrate 9router-chat into my application?

9router-chat integrates into applications via the 9Router endpoint using OpenAI SDK or Anthropic API format. Configure your app to point requests to 9router-chat's chat completions API, and it handles multi-provider routing, streaming, and automatic fallback setup transparently.

SKILL.md

rendered from the published skill — quoted content, verbatim

9Router — Chat

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Endpoints

  • POST $NINEROUTER_URL/v1/chat/completions — OpenAI format
  • POST $NINEROUTER_URL/v1/messages — Anthropic format

Discover

curl $NINEROUTER_URL/v1/models | jq '.data[].id'
# Per-model metadata (contextWindow, params)
curl "$NINEROUTER_URL/v1/models/info?id=openai/gpt-4o"

Combos (e.g. vip, mycodex) auto-fallback through multiple providers.

OpenAI format

curl -X POST $NINEROUTER_URL/v1/chat/completions \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5","messages":[{"role":"user","content":"Hi"}],"stream":false}'

JS (OpenAI SDK):

```js import OpenAI from "openai"; const client = new OpenAI({

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
skills/9router-chat/SKILL.md

Related skills

Tags

llm-routing multi-provider-fallback api-gateway streaming-responses model-abstraction provider-agnostic chat-orchestration code-generation-bridge openai-anthropic-compat