feat(adapters): Pi 适配器(第二批 Harness 第二发) - #4
Merged
Merged
Conversation
…json 钉默认模型) - providers.apiflux 写入 ~/.pi/agent/models.json(openai-completions + /v1,模型仅需 id——元数据全可选已核实) - key 只进 pi 凭证库 auth.json(type=api_key,0600),stored credential 优先级已核实(provider-composer.ts) - --model 时 settings.json 写 defaultProvider/defaultModel 组合(resolver 要求两者同有) - pi 的 JSONC 配置安全降级:解析失败不动文件、打印手动 merge snippet - 路径尊重 PI_CODING_AGENT_DIR;.scratch issue 05 核对项闭环
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
第二批 Harness(.scratch issue 03/05)之 Pi(badlogic/pi-mono coding agent)。核对项全部读源码闭环,两个此前的担忧都解除了:
关键结论(读 pi-mono 源码)
ModelDefinitionSchema只有id必填——"要求 contextWindow/cost 全量元数据"是过时文档误导,models 数组只写{id}~/.pi/agent/auth.json(type: "api_key",0600):provider-composer.ts 中 stored credential 优先于 models.json 的apiKey字段,key 不进配置文件(与 OpenCode 方案同构)settings.json的defaultProvider+defaultModel组合(resolver 要求两者同有且 provider 已配置鉴权)PI_CODING_AGENT_DIR覆盖;detect 依据~/.pi/测试
bun test88 pass(新增 pi 适配器 14 例 + init 接线 1 例)bun run build通过发版
合并后真机冒烟(
apiflux init --tool pi --model <id>→ pi 内 /model 列出 ApiFlux 模型、默认模型生效、对话跑通),过了 bump 0.5.0 + tag(记得薄壳 dependencies 同步 bump)。