Skip to content
Back to skills

1579 Dynamic Routing 8684ab9c

ASecurity

Configure complex routing in dashboard without code changes. Use route names instead of model names.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businesstypescriptnodetesting

Works with

  • cli

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1579-dynamic-routing_8684ab9c --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1579 Dynamic Routing 8684ab9c?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1579 Dynamic Routing 8684ab9c
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1579-dynamic-routing-8684ab9c/badge)](https://www.skillsdirectory.com/skills/tools-only-1579-dynamic-routing-8684ab9c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Dynamic Routing

Configure complex routing in dashboard without code changes. Use route names instead of model names.

## Usage

```typescript
const response = await client.chat.completions.create({
  model: 'dynamic/smart-chat', // Route name from dashboard
  messages: [{ role: 'user', content: 'Hello!' }],
})
```

## Node Types

| Node             | Purpose            | Use Case                        |
| ---------------- | ------------------ | ------------------------------- |
| **Conditional**  | Branch on metadata | Paid vs free users, geo routing |
| **Percentage**   | A/B split traffic  | Model testing, gradual rollouts |
| **Rate Limit**   | Enforce quotas     | Per-user/team limits            |
| **Budget Limit** | Cost quotas        | Per-user spending caps          |
| **Model**        | Call provider      | Final destination               |

## Metadata

Pass via header (max 5 entries, flat only):

```typescript
headers: {
  'cf-aig-metadata': JSON.stringify({
    userId: 'user-123',
    tier: 'pro',
    region: 'us-east'
  })
}
```

## Common Patterns

**Multi-model fallback:**

```
Start → GPT-4 → On error: Claude → On error: Llama
```

**Tiered access:**

```
Conditional: tier == 'enterprise' → GPT-4 (no limit)
Conditional: tier == 'pro' → Rate Limit 1000/hr → GPT-4o
Conditional: tier == 'free' → Rate Limit 10/hr → GPT-4o-mini
```

**Gradual rollout:**

```
Percentage: 10% → New model, 90% → Old model
```

**Cost-based fallback:**

```
Budget Limit: $100/day per teamId
  < 80%: GPT-4
  >= 80%: GPT-4o-mini
  >= 100%: Error
```

## Version Management

- Save changes as new version
- Test with `model: 'dynamic/route@v2'`
- Roll back by deploying previous version

## Monitoring

Dashboard → Gateway → Dynamic Routes:

- Request count per path
- Success/error rates
- Latency/cost by path

## Limitations

- Max 5 metadata entries
- Values: string/number/boolean/null only
- No nested objects
- Route names: alphanumeric + hyphens

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.