package
Version:
v0.7.4
Opens a new window with list of versions in this module.
Published: Jul 25, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package llmretry 是直接模型调用共用的请求层重试内核:仅重试模型适配器
明确标记为 retryable 的错误,遵守 Retry-After/指数退避,并经 ToolProgress
把进度送入既有工作台观察链。账户、鉴权、权限等终止错误会立即返回;
retryable 错误持续重试,生命周期只由 context 控制。
Generate 调用 model.Generate。retryable 错误退避后持续重试,直到成功或
context 结束;非 retryable 错误立即返回。
type Config struct {
Agent string
OnRetry func(Event)
}
Config 配置重试的可观测信息,不改变重试语义。
Generator 是请求重试所需的最小模型接口。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.