Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#291 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@prakashNalla đang làm issue này rồi.

Từ ngày 21/10/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, typescript
Lĩnh vực
documentation

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
13
Fork
7
Merge trung bình
3 giờ 41 phút
Pull request đã merge (30 ngày)
155

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codercops/chatcops

Tất cả issue của codercops/chatcops

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.