Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

docs: update the providers page for openai-compatible, registerProvider and provider imports

Aperta
#291 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@prakashNalla ci sta già lavorando.

Dal 21/10/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
markdown, typescript
Ambito
documentation

Direzione di ricerca

Read website/src/content/docs/core/providers.mdx alongside packages/core/src/types.ts and ProviderConfig to check the options table. Use packages/core/tests/providers/openai-compatible.test.ts and registry.test.ts for working examples, and review packages/core/src/providers/registry.ts, base.ts, and packages/server/src/config.ts for registration and custom provider behavior. Update the listed sections and examples, then verify them with the website build and add the empty changeset described in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

documentation good first issue hacktoberfest website

Three provider changes landed this week and the providers page doesn't know about any of them yet: the openai-compatible type and registerProvider() (#289), the provider classes moving to their own import paths (#288), and the server taking a provider object you built yourself. This issue brings website/src/content/docs/core/providers.mdx up to date.

What to do

  • "Provider configuration" (lines 8 to 31): add an openai-compatible block. Note that apiKey is required for claude, openai and gemini, and setup fails with a clear error without it.
  • "Options" table (lines 43 to 53): add headers (OpenAI and openai-compatible, sent on every request) and supportsTools (same providers, default true, tools aren't sent when false and one warning is logged). Change the maxTokensParam row: the default is 'max_completion_tokens' for openai and 'max_tokens' for openai-compatible.
  • "OpenAI-compatible servers" (lines 61 to 83): switch the Ollama and OpenRouter examples to type: 'openai-compatible'. Ollama needs no apiKey now, so drop the 'ollama' placeholder line. Add one example with headers (OpenRouter's HTTP-Referer is a good one) and one with supportsTools: false for a model that can't call tools. baseURL and model are required for this type.
  • New section "Custom providers", after "AIProvider interface":
    • registerProvider('my-llm', async (config) => new MyProvider(config)), then provider: { type: 'my-llm', ... }. The factory gets the whole provider config. Registering a built-in name throws, and registering the same name again replaces it.
    • The other way: pass the provider object itself as the server's provider (packages/server/src/config.ts, lines 17 to 20). Anything with step() or chat() works.
  • "Direct provider usage" (lines 112 to 138): add a short note that ClaudeProvider, OpenAIProvider and GeminiProvider are imported from @chatcops/core/providers/claude, /openai and /gemini, not from @chatcops/core, so importing core doesn't load all three SDKs.

Where to look

  • packages/core/src/types.ts, ProviderConfig
  • packages/core/src/providers/registry.ts and base.ts (createProvider)
  • packages/core/tests/providers/openai-compatible.test.ts and registry.test.ts for working configs

Acceptance criteria

  • Every option in ProviderConfig is in the Options table, and nothing that isn't
  • Every code sample on the page matches the current types (copy them into a scratch .ts file in packages/core and run pnpm --filter @chatcops/core typecheck, then delete it)
  • pnpm --filter @chatcops/website build succeeds
  • Changeset: pnpm changeset --empty (docs only)

Please get this merged by Dec 8, since the v0.6 release notes link to it.


Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.

Lingua principale
TypeScript
Stelle
13
Fork
7
Merge medio
3h 41m
PR unite (30g)
155

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codercops/chatcops

Tutte le issue di codercops/chatcops

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.