Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#291 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@prakashNalla ya está trabajando en esto.

Desde el 21/10/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
markdown, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
13
Forks
7
Merge medio
3 h 33 min
PR fusionados (30 d)
176

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codercops/chatcops

Todos los issues de codercops/chatcops

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.