Python ModelLimits drops max_output_tokens from model metadata
维护者通常 1 天内回复
评估
调研方向
从公开的 Python ModelLimits 类型及其 from_dict() 和 to_dict() 方法开始,然后跟踪 CopilotClient.list_models() 如何反序列化模型限制。复现提供的示例,并验证 max_output_tokens 在反序列化后仍被保留,且包含在序列化的模型元数据中。
由索引模型根据 Issue 内容生成。
描述
Description
The generated RPC schema includes max_output_tokens in ModelCapabilitiesLimits, but the public Python ModelLimits type does not. CopilotClient.list_models() deserializes model limits through ModelLimits.from_dict(), so the value is discarded.
This follows the same schema/public-type parity principle addressed for TypeScript in #2569, although this issue affects the Python model-list response path rather than the session override path.
Reproduction
from copilot import ModelLimits
limits = ModelLimits.from_dict(
{
"max_prompt_tokens": 128000,
"max_output_tokens": 16384,
"max_context_window_tokens": 144384,
}
)
assert limits.max_output_tokens == 16384
assert limits.to_dict()["max_output_tokens"] == 16384
Currently, ModelLimits has no max_output_tokens attribute and to_dict() omits the field.
Expected behavior
ModelLimits should preserve max_output_tokens when deserializing and serializing model metadata.
- 主要语言
- TypeScript
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 64
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
Clarify SDK architecture and in-process runtime transport可能已有人在做 @KalebCole 于 5 天前认领。 未关闭documentation
难度 1/5 1 小时以内 新手友好度 92/100
github/copilot-sdk#2804 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
github/copilot-sdk#2793 ·
维护者通常 1 天内回复
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2782 ·
维护者通常 1 天内回复
-
Rust: subagent lifecycle hooks are logged as unknown可能已有人在做 @hackberry-lab 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
github/copilot-sdk#2781 ·
维护者通常 1 天内回复
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2779 ·
维护者通常 1 天内回复
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
agent-ready area: config area: skills type: chore upstream: brain-kit
难度 1/5 1 小时以内 新手友好度 95/100
-
enhancement priority:low ready-for-dev
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
bug escritorio mapa
难度 2/5 1-3 小时 新手友好度 72/100
marcosferr/reporte-ciudadano#4 · 1 条评论 ·
-
area: material/sort gemini-triaged needs triage
难度 2/5 1-3 小时 新手友好度 70/100
angular/components#33933 ·
维护者通常 1 天内回复