跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
AI 与知识库

add-model

Add a new LLM model to apps/sim/providers/models.ts with specs verified against the provider's live API docs (no hallucination)

simstudioai · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add simstudioai/sim --skill add-model

技能说明


name: add-model description: Add a new LLM model to apps/sim/providers/models.ts with specs verified against the provider's live API docs (no hallucination) argument-hint: [docs-url]

Add Model Skill

You add a new model entry to apps/sim/providers/models.ts. Every numeric and capability claim MUST be derived from a live web fetch of the provider's official docs in this session. Marketing emails, training data, and your prior knowledge are not sources of truth — they routinely hallucinate pricing, context windows, and capability lists.

Hard rules (do not skip)

  1. Live-fetch or refuse. Before writing the entry, you must successfully WebFetch the provider's official models/pricing page in this session. If you cannot reach an authoritative source for any field, mark the field as UNVERIFIED in your report and ask the user before guessing. Never fill in pricing or capabilities from memory.
  2. Two-source rule for pricing. Cross-check input/output/cached pricing against at least one secondary source (OpenRouter, Artificial Analysis, CloudPrice, mem0, intuitionlabs). If sources disagree, the provider's own docs win — but flag the disagreement.
  3. Read the code before setting capability flags. Capability flags are dead unless the provider's implementation under apps/sim/providers/{provider}/ actually consumes them (see Consumption Matrix below). Setting a flag the provider ignores is a silent bug.
  4. Cite every fact. Your final report must list the URL each value came from. No URL → not verified.

Your Task

  1. Identify provider and model id from user args
  2. Live-fetch official docs + pricing page + capability/parameter pages + at least one secondary source
  3. Apply the Consumption Matrix to know which capability flags are real
  4. Read 2-3 sibling entries in models.ts and match their pattern exactly
  5. Check the repo-side touchpoints that are NOT data-driven (hosted-key billing, tests, provider code)
  6. Insert the entry, run bun run lint, print the verification report

Step 1: Live source-of-truth lookup

In priority order — fetch all that exist for the provider:

ProviderModels indexPricingReasoning/parameter caveats
OpenAIplatform.openai.com/docs/modelsopenai.com/api/pricingplatform.openai.com/docs/guides/reasoning
Anthropicplatform.claude.com/docs/en/about-claude/models/overviewclaude.com/pricing (API section)platform.claude.com/docs/en/build-with-claude/extended-thinking
Google (Gemini)ai.google.dev/gemini-api/docs/modelsai.google.dev/pricingai.google.dev/gemini-api/docs/thinking
xAIdocs.x.ai/developers/modelsdocs.x.ai/developers/models (per-model detail page)docs.x.ai/developers/model-capabilities/text/reasoning
Mistraldocs.mistral.ai/getting-started/models/models_overviewmistral.ai/pricingn/a
DeepSeekapi-docs.deepseek.com/quick_start/pricingsameapi-docs.deepseek.com/guides/reasoning_model
Groqconsole.groq.com/docs/modelsgroq.com/pricingn/a
Cerebrasinference-docs.cerebras.ai/modelscerebras.ai/pricingn/a

Secondary verification (use at least one): openrouter.ai/<provider>/<model>, artificialanalysis.ai/models/<model>, cloudprice.net/models/<provider>-<model>.

Use a precise WebFetch prompt: "Extract for {model_id}: exact model id string, context window in tokens, input price per 1M, cached input price per 1M, output price per 1M, max output tokens, supported reasoning effort levels, accepted parameters (temperature, top_p), release date. Do not fill in fields you cannot find."

Step 2: Consumption Matrix (which provider honors which capability)

CapabilityHonored byEffect if set elsewhere
temperatureAll providers (passed through if set)Safe but inert on always-reasoning models that reject it
toolUsageControlAll providers (provider-level, not per-model)n/a — set on ProviderDefinition, not models
reasoningEffortopenai/core.ts, azure-openai, xai, deepseek, groq, zai, meta, litellm (each index.ts)Not read by anthropic/gemini (they use thinking) or by mistral, cerebras, openrouter, fireworks, vertex — re-grep before assuming
verbosityopenai/core.ts, azure-openai/index.ts onlyDead elsewhere
thinkinganthropic/core.ts, gemini/core.ts; deepseek, groq, zai, kimi (each index.ts) read the resolved thinkingLevelDead elsewhere
thinking.streamedDocs generator + getThinkingStreamVisibility (models.ts); anthropic/core.ts uses 'summary' to request display: 'summarized' on agent-events runsMandatory on Anthropic-family thinking models (agent-stream-docs:check fails without it); other families fall back to provider defaults
nativeStructuredOutputsanthropic/core.ts, bedrock/index.ts (via models.ts supportsNativeStructuredOutputs, which reads the flag)Dead elsewhere — fireworks/baseten/together/openrouter call their own provider-level supportsNativeStructuredOutputs that ignores the model flag (always on, always off, or OpenRouter API metadata)
maxOutputTokensRead by UI + executor for token estimationAlways meaningful — set if provider documents a cap
computerUseproviders/utils.ts (getComputerUseModels → computerUseModels routing)Set only on actual computer-use SKUs
deepResearchUI flag for routing to deep-research SKUsSet only on actual deep-research model IDs
memory: falseConversation persistence opt-outSet only when model genuinely cannot maintain history (e.g., deep-research)

Always re-grep before relying on this table — the codebase moves:

rg "reasoningEffort|reasoning_effort" apps/sim/providers/<provider>/
rg "verbosity" apps/sim/providers/<provider>/
rg "request\.thinking|thinking:" apps/sim/providers/<provider>/
rg "supportsNativeStructuredOutputs|na
阅读完整来源 ↗