AGENTS.md@internal/llmA
AGENTS.md@internal/llm from iohub/yagent is an AGENTS.md file: the standing instructions coding agents read in that repo.
mdr add iohub/yagent/internal/llm/AGENTS.md@git:20261027.0637c8bPins git:20261027.0637c8b in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- AGENTS.md file
- Repository
- iohub/yagent
- Path
internal/llm/AGENTS.md- Versions recorded
- 4
- Latest version
- git:20261027.0637c8b, committed Oct 27, 2026
- First version recorded
- Oct 21, 2026
- Size
- 11,526 bytes
- Repository stars
- 31
- License
- Apache-2.0
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# internal/llm — 引擎、路由、故障转移、在飞闸门 > 范围:本目录内不可派生的约束。全局见仓库根 `AGENTS.md` §2.3 与 §6.3。 ## 边界 `Engine` 抽象 + 两套协议实现(openai-go SDK / 自研 Anthropic Messages)、provider→引擎的解析与缓存、 auto-routing 三档、故障转移、进程级在飞闸门、以及**发出/读入的字节形状**。 不负责工具循环、不负责压缩阈值推导(`internal/compression`);输入 token 的**跨 provider 归一**在本包 (第 12 条),怎么展示是 `internal/tui` 的事。 ## 硬约束 **1. 引擎构造函数收整个 `*config.ProviderConfig`,不收散参数** (`engine_openai.go:36-40`、`engine_anthropic.go:111-112`)。散参数时每往 `ProviderConfig` 加一个键 就多一处"配置写了但没人读"——`max_tokens` 曾经正是这样失效的(请求体里根本没有它,thinking 模型 因此能一口气生成 39k token)。 **2. `0` 一律按"没配"处理,且不发这个字段**(`engine_openai.go:28-32,162-167`、 `engine_anthropic.go:100,269-279`)。优先级:`单次 CallOptions > provider 默认 > 不发`。 显式发 `temperature: 0` 会把服务端默认采样顶成贪心解码;`ProviderConfig.Temperature` 是裸 `float64`,分不清"写了 0.0"与"没写"。anthropic 侧未配 `max_tokens` 时兜底 8192(Messages API 必填)。 **3. 认不出的 `reasoning_effort` = 整个 thinking 字段缺席**(`engine_anthropic.go:304-316,323-336`)。 映射是 `low|medium|high|max → 1024/8192/24576/32000`;**绝不发 `budget_tokens: 0`**——provider 要求 ≥1024,一个拼错的 effort 会让此后每次调用都 400。此时也不得连带把 `temperature` 钉成 1.0。 开思考时 `max_tokens` 至少 `budget+4096`。 **4. 在飞闸门是进程级,不是每引擎一份**(`inflight.go:8-19`):429 记在账号上,两个引擎各放 8 格 …
Read the whole file at its exact version.
How to install
mdr add iohub/yagent/internal/llm/AGENTS.md@sha256:4c8befd99cf3fc28The line at the top of this page pins the label git:20261027.0637c8b, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_xicgnzlyoynv22pz)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Oct 21, 2026 and Oct 27, 2026, about one every 2 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261027.0637c8b latest | 2026-10-27 | 0637c8b | 11,526 B | A | view · diff |
| git:20261025.f70d95c | 2026-10-25 | f70d95c | 11,269 B | A | view · diff |
| git:20261024.9b44441 | 2026-10-24 | 9b44441 | 8,662 B | A | view · diff |
| git:20261021.9f5bf87 | 2026-10-21 | 9f5bf87 | 4,943 B | A | view |
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (11526 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
iohub/yagent · 31 stars · license Apache-2.0 · pushed 2026-11-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_xicgnzlyoynv22pz GET https://markdownregistry.com/api/v1/resolve?ref=iohub/yagent/internal/llm/AGENTS.md GET https://markdownregistry.com/api/v1/blob/4c8befd99cf3fc28a7c75ad208e1968c98fafa0a7ae272d5e4c664fbeccfe06c
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.