Guides AI model choices in new workflows, existing workflows, pasted workflow JSON, and model-availability questions. Load before recommending, selecting, repla
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-model-selection-1f9db7502c3b ,按照其中的说明把「model-selection」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Your model memory tends to suggest GPT-4o, GPT-4.1, or Claude 3.x. These are outdated defaults for new workflows. Do not recommend them just because they seem familiar, stable, or inexpensive. Preserve an existing or requested model. When choosing an unspecified model, use an older one only when verified access constraints require it.
First check whether the user supplied a model or the workflow already has one.
Preserve that ID without calling searchModels to validate it. A model in a
revised design is still a user choice, even if its name is unfamiliar.
Do not question its validity or suggest a replacement solely because you do not
recognize it.
Only when YOU must choose an unspecified model, obtain a credential model list,
an explicit named recommendation in the node's @builderHint, or current catalog
evidence. A node's @default and generic advice to "prefer stable models" are not
recommendations. Unspecified model plus no credential and no named hint means
call searchModels before writing the workflow. Do not substitute a remembered ID.
nodes(action="explore-resources") with that credential and the exact
lookup method from the node definition. Its available models take precedence
over builder hints and public catalogs. Choose one that fits the operation,
task, and budget. Explain access constraints if they require an older model.@builderHint when it fits the task and serving provider. Generic
advice such as "prefer stable models" does not name a candidate. Do not treat
@default as a builder-hint recommendation.searchModels with the serving
provider before choosing an ID. Choosing a model while building a workflow
is preliminary selection too. Reuse relevant results already retrieved for
this task; do not repeat discovery for every node.For an unspecified model, leave query empty unless the user requested a model
maker or family. Do not search for a remembered model ID and treat its presence
as proof that it is current. Compare current candidates before choosing one.
Keep the requested serving provider and model maker. For Claude through OpenRouter,
call searchModels({ provider: "openrouter", query: "claude" }). For OpenAI through
OpenRouter, use query: "openai". The query filters model IDs and names before
selecting the ten most recent matches, so other makers do not fill the results.
Use an exact returned ID in the anthropic/ or openai/ namespace. Do not construct
OpenRouter IDs from direct-provider names. If no suitable model is returned,
consult the serving provider's official catalog or documentation.
Catalog results are advisory and may include previews. Prefer a stable model that fits the task, and report the source and freshness of catalog-based advice. Catalog presence does not prove credential access. Once a credential is connected, its resource lookup takes precedence. Never use catalog search to replace a failed credential lookup or merely to check an unfamiliar model.
When making a new recommendation, state which access or capabilities remain unverified. Do not invent model IDs, versions, prices, or rankings. Do not force a paid credential to get a newer model.
Do not call searchModels to diagnose an existing model error. Catalog recency
and catalog absence do not justify a repair. Keep the model unchanged while
collecting the actual failure evidence; a failed lookup is not permission to guess.
A generic 404 or MODEL_NOT_FOUND reports a failed request. It does not alone
prove global model nonexistence or account-wide unavailability. Check the actual
request, provider endpoint, credential, operation, and execution evidence before
recommending a replacement. Scope any provider rejection to what it establishes.
Absence from a partial model list or documentation page is not a rejection.
Use execution-specific evidence to distinguish simulated verification from real provider calls. The current credential inventory does not establish whether an earlier run was simulated. When direct execution and chat behave differently, compare their records and configuration. Keep unsupported causes as hypotheses; do not claim a live fix from mocked verification.