본문으로 건너뛰기
cccskills
무료GitHub에 공개

add-llm-provider-or-model

Add a new LLM model to the preset catalog, or a whole new LLM provider — with the mandatory pre-flight verification of model id, pricing, and context window against the provider's official docs. Use when asked to add/update LLM models, providers, or pricing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords스타 463(GitHub 463 + cccskills 0)
연동 도구OpenAI

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Add an LLM provider or model

Pre-flight: verify BEFORE adding (mandatory)

Never add a model from memory — model ids and prices change and training data goes stale. For each model, confirm from the provider's official docs/pricing page (web search / fetch, cite the URL in the PR):

  1. Exact model_id as the API expects it (e.g. claude-sonnet-5, gpt-5.4-mini — not the marketing name).
  2. Input and output cost per million tokens (USD) — these feed real cost dashboards (llm_usage_record, console cost metrics); a wrong number corrupts every org's reported spend.
  3. Context window (tokens) and vision support.
  4. The model actually works on the provider's current API version used by our client (backend/app/ai/llm/clients/<provider>_client.py).

If any of these can't be verified from an official source, stop and say so — don't guess.

Adding a model (existing provider)

  1. Append to LLM_MODEL_DETAILS in backend/app/models/llm_model.py: name (display), model_id, provider_type, is_preset: True, is_enabled, supports_vision, context_window_tokens, input_cost_per_million_tokens_usd, output_cost_per_million_tokens_usd. Flags to handle deliberately:
    • is_default: True — at most one per provider_type (that provider's flagship). Changing a default is a product decision — ask first.
    • is_small_default: True — the provider's cheap/fast model for background tasks; at most one per provider_type.
  2. Preset providers auto-sync with this catalog (llm_service.py — "Only auto-sync preset providers with our curated catalog"), so existing orgs pick the model up; no migration needed. Custom providers keep the user's explicit selections.
  3. If the model needs different request handling (new reasoning params, streaming quirks), extend the provider client — don't special-case in agent_v2/planner code.

Adding a provider

  1. Client — backend/app/ai/llm/clients/<provider>_client.py, implementing the same streaming interface as the existing clients (openai_client.py is the reference; anthropic_client.py for a non-OpenAI-shaped API). First check whether the provider is OpenAI-compatible — then it may just work through the existing custom provider (base_url override) and you only need presets.
  2. Dispatch — wire the provider_type branch in backend/app/ai/llm/llm.py (self.provider == "<type>" → client).
  3. Catalog — add to LLM_PROVIDER_DETAILS in backend/app/models/llm_provider.py (type, name, description, config, credentials schema) and define the <Provider>Config / <Provider>Credentials classes next to the existing ones. The credentials schema drives the settings-page form; credentials are Fernet-encrypted at rest (encrypt_credentials) — never log or return them.
  4. Models — add its models to LLM_MODEL_DETAILS (pre-flight above).
  5. Frontend — icon in frontend/components/LLMProviderIcon.vue; the provider form itself is schema-driven via GET /llm/available_providers.
  6. Prompt language: conversational-vs-code agent split in backend/app/ai/prompt_language.py is provider-agnostic — no change needed unless the provider mishandles system prompts.

Verification

cd backend
# Catalog sanity: unique ids; ≤1 default and ≤1 small default per provider
uv run python - <<'EOF'
from collections import Counter
from app.models.llm_model import LLM_MODEL_DETAILS as M
ids = [m["model_id"] for m in M]
assert len(ids) == len(set(ids)), "duplicate model_id"
for flag in ("is_default", "is_small_default"):
    per = Counter(m["provider_type"] for m in M if m.get(flag))
    dupes = {p: n for p, n in per.items() if n > 1}
    assert not dupes, f"multiple {flag} for provider(s): {dupes}"
assert all(m["input_cost_per_million_tokens_usd"] > 0 and m["output_cost_per_million_tokens_usd"] > 0 for m in M)
print(f"OK: {len(M)} models")
EOF
# Unit: connection-test schema still valid
uv run pytest tests/unit/test_llm_test_connection_schema.py -q
# Live round-trip (real key, env/integrations.json only — never committed)
uv run pytest tests/integrations/llm_clients.py -k "<provider>" -v

Then a live UI check: boot the stack, Settings → AI/LLMs → the provider and model appear, "Test connection" passes with a real key, and one prompt round-trips through the new model. Confirm a cost row lands in the console usage metrics with the expected per-token math.

Pitfalls

  • Wrong price or a price in per-1K units instead of per-million — the catalog is per million tokens.
  • Two is_default/is_small_default models — org defaults become nondeterministic.
  • Adding an OpenAI-compatible provider as a full new client instead of a preset on the custom provider — double maintenance for nothing.
  • CI note: integration-llms in .github/workflows/e2e-tests.yml currently skips google/bedrock/openai-reasoning cases — don't "fix" a red run by extending those skips; flag it instead.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Add a new data source / connection type (e.g. a SQL Server-like database) end to end — client with get_schemas/execute_query, config + credentials schemas, registry entry, icon, tests — plus the verification steps. Also covers adding or updating an MCP connector (a preset, not a new type). Use when adding or significantly extending a connector.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords4632026년 10월 26일 업데이트

Query, visualize, and analyze data in a Bag of Words (BOW) workspace via the bagofwords MCP tools. Use for creating reports, running tracked queries, and building dashboards.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords4632026년 10월 26일 업데이트

Update the product docs at docs.bagofwords.com (Mintlify) with text and fresh screenshots after a user-facing change ships. Use when a merged change alters user-visible behavior, adds a feature, or when asked to update/refresh documentation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords4632026년 10월 26일 업데이트

The locale/i18n architecture of bagofwords — catalogs, resolution order, RTL, backend contracts — and the procedures for adding strings, adding a locale, or translating UI. Use when adding/changing user-facing strings, working on RTL, emails, localized errors, or anything locale-related.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords4632026년 10월 26일 업데이트

qa

무료

Run a live QA pass over the app — first map all user-facing functionality, then boot the full stack and manually exercise flows with Playwright, recording pass/fail evidence and filing a QA report. Use for release QA, post-merge smoke passes, or "QA the app / this area" requests.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords4632026년 10월 26일 업데이트

Build or refresh a product README showcase using a seeded Bag of Words workspace, polished in-product screenshots, and repository-ready visual assets. Use when positioning has changed, README screenshots are stale, a launch/demo workspace is needed, or the user asks to populate agents, reports, dashboards, evals, automations, connectors, or monitoring for product storytelling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bagofwords1/bagofwords4632026년 10월 26일 업데이트

bagofwords1의 스킬 모두 보기

이 스킬의 문제 신고