Add provider

From hoangsonww/Forge-Agentic-Coding-CLI · View interactive version

Add provider is an AI agent skill from the GitHub repository hoangsonww/Forge-Agentic-Coding-CLI. Scaffold a new model provider for Forge — class, registry wiring, providerEnum entry, local-catalog classification, router check, and a unit test with mocked transport.

How to use this skill

Skill file

Copy the shape of an existing provider (src/models/ollama.ts,

src/models/openai.ts, src/models/anthropic.ts). Do not invent a new

shape.

1. `src/models/<name>.ts`

chat/complete, token count, streaming).

cold-start budget.

node-fetch.

retryable flag and a recoveryHint where possible.

2. `src/models/registry.ts`

3. `src/models/local-catalog.ts`

ad-hoc regex in the provider for capability detection.

4. `src/models/router.ts`

routing changes, update test/unit/adapter.test.ts.

5. Unit test

Mock the transport (see test/unit/adapter.test.ts). Cover:

6. Docs

Update the provider table in docs/ARCHITECTURE.md §6, bump the

README "At a glance" count, and add a one-line setup note to

docs/SETUP.md.

Finish with the verify skill.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.