Skip to content

Commit ffe4def

Browse files
authored
docs(infra): add model reference freshness guidelines (#36626)
Add a "Model references in docs and examples" subsection to `AGENTS.md` and `CLAUDE.md` under Documentation standards. Codifies that docstrings and examples should use current GA model names, not stale ones — and explicitly draws the line between updating illustrative references (encouraged) and changing shipped code defaults (breaking change, separate process).
1 parent efa97e5 commit ffe4def

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ def send_email(to: str, msg: str, *, priority: str = "normal") -> bool:
194194
- Ensure American English spelling (e.g., "behavior", not "behaviour")
195195
- Do NOT use Sphinx-style double backtick formatting (` ``code`` `). Use single backticks (`` `code` ``) for inline code references in docstrings and comments.
196196

197+
#### Model references in docs and examples
198+
199+
Always use the latest generally available (GA) models when referencing LLMs in docstrings and illustrative code snippets. Avoid preview or beta identifiers unless the model has no GA equivalent. Outdated model names signal stale code and confuse users.
200+
201+
Before writing or updating model references, verify current model IDs against the provider's official docs. Do not rely on memorized or cached model names — they go stale quickly.
202+
203+
Changing **shipped default parameter values** in code (e.g., a `model=` kwarg default in a class constructor) may constitute a breaking change — see "Maintain stable public interfaces" above. This guidance applies to documentation and examples, not code defaults.
204+
205+
For model *profile data* (capability flags, context windows), use the `langchain-profiles` CLI described below.
206+
197207
## Model profiles
198208

199209
Model profiles are generated using the `langchain-profiles` CLI in `libs/model-profiles`. The `--data-dir` must point to the directory containing `profile_augmentations.toml`, not the top-level package directory.

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ def send_email(to: str, msg: str, *, priority: str = "normal") -> bool:
194194
- Ensure American English spelling (e.g., "behavior", not "behaviour")
195195
- Do NOT use Sphinx-style double backtick formatting (` ``code`` `). Use single backticks (`` `code` ``) for inline code references in docstrings and comments.
196196

197+
#### Model references in docs and examples
198+
199+
Always use the latest generally available (GA) models when referencing LLMs in docstrings and illustrative code snippets. Avoid preview or beta identifiers unless the model has no GA equivalent. Outdated model names signal stale code and confuse users.
200+
201+
Before writing or updating model references, verify current model IDs against the provider's official docs. Do not rely on memorized or cached model names — they go stale quickly.
202+
203+
Changing **shipped default parameter values** in code (e.g., a `model=` kwarg default in a class constructor) may constitute a breaking change — see "Maintain stable public interfaces" above. This guidance applies to documentation and examples, not code defaults.
204+
205+
For model *profile data* (capability flags, context windows), use the `langchain-profiles` CLI described below.
206+
197207
## Model profiles
198208

199209
Model profiles are generated using the `langchain-profiles` CLI in `libs/model-profiles`. The `--data-dir` must point to the directory containing `profile_augmentations.toml`, not the top-level package directory.

0 commit comments

Comments
 (0)