mirror of
https://github.com/hwchase17/langchain.git
synced 2026-04-10 14:33:45 +00:00
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).
This commit is contained in:
10
AGENTS.md
10
AGENTS.md
@@ -194,6 +194,16 @@ def send_email(to: str, msg: str, *, priority: str = "normal") -> bool:
|
||||
- Ensure American English spelling (e.g., "behavior", not "behaviour")
|
||||
- Do NOT use Sphinx-style double backtick formatting (` ``code`` `). Use single backticks (`` `code` ``) for inline code references in docstrings and comments.
|
||||
|
||||
#### Model references in docs and examples
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
For model *profile data* (capability flags, context windows), use the `langchain-profiles` CLI described below.
|
||||
|
||||
## Model profiles
|
||||
|
||||
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.
|
||||
|
||||
10
CLAUDE.md
10
CLAUDE.md
@@ -194,6 +194,16 @@ def send_email(to: str, msg: str, *, priority: str = "normal") -> bool:
|
||||
- Ensure American English spelling (e.g., "behavior", not "behaviour")
|
||||
- Do NOT use Sphinx-style double backtick formatting (` ``code`` `). Use single backticks (`` `code` ``) for inline code references in docstrings and comments.
|
||||
|
||||
#### Model references in docs and examples
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
For model *profile data* (capability flags, context windows), use the `langchain-profiles` CLI described below.
|
||||
|
||||
## Model profiles
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user