Repository navigation
Conversation
OMP is Pi's fork and keeps the same provider catalog, so the switch, restore and ownership paths are shared with it; only three things differ. - The file is ~/.omp/agent/models.yml, in YAML rather than JSON. OMP only ever reads it, so TeamAI owns the bytes. - PI_CODING_AGENT_DIR is not honored. It relocates Pi's agent dir, so reading it here would send OMP's catalog into Pi's directory on a machine that sets it for Pi. The default layout only, the position omp-hooks.ts already takes for OMP. - apiKey has no inline expansion. An environment-backed key is written as `!printenv VAR`: OMP runs a `!command` value through /bin/sh and uses its output, so the key stays out of the file. A key stored locally with no environment reference is still written as-is.
|
Findings
Testing
|
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.
What
Adds OMP (Oh My Pi) as a
modelstarget, soteamai models switch/restore/pullreach it like any other agent.OMP is Pi's fork and keeps the same provider catalog, so the switch, restore and ownership paths are shared with Pi —
piProvider,piSnapshot,piKeyOfandsameManagedare reused as-is. Only three things differ:~/.pi/agent/models.json~/.omp/agent/models.yml(YAML)PI_CODING_AGENT_DIRapiKey$VAR, expanded by Pi!printenv VAR, run by OMPNotes on the last two:
PI_CODING_AGENT_DIRrelocates Pi's agent dir, so reading it here would send OMP's catalog into Pi's directory (or the reverse) on a machine that sets it for either tool. This is the positionomp-hooks.tsalready takes for OMP, and it means OMP's path is constant — nosameAgentSettingsPathcase is needed.$VARexpansion, but it runs a!commandapiKeythrough/bin/shand uses its output. So an environment-backed key is written as!printenv VARand stays out of the file, the same guarantee the other agents' forms give. A key stored locally with no environment reference (no variable to reference) is still written as-is. When the variable is unset, OMP fails at startup with a named error rather than sending an empty key.OMP only reads
models.yml; it never rewrites it, so TeamAI owns the bytes and the serialization is ours to choose.Verification
npm run build,npx tsc --noEmit,npm run lint,npx vitest run(8087 passed), and the e2e suite are green. Real-CLI run against the builtdist, in a scratchHOME, with the actualomp18.6.1 binary consuming the file TeamAI wrote:restorereturns the file to its prior bytes, including a member's own providers alongside TeamAI's. Also checked by hand:--dry-runwrites nothing; an unparseablemodels.ymlfails closed and is left untouched; a provider already owned by the member under the same key is refused rather than overwritten.Docs
Bilingual, kept in sync:
docs/designs/model-profiles.{md,zh-CN.md}(agent-writes table, key-reference sentence, path-pinning sentence),docs/product-overview.{md,zh-CN.md},docs/usage-guide.{md,zh-CN.md}, and the Oh My Pimodelscolumn in all five READMEs.Note for reviewers
writePi/piDocgained anagent: 'pi' | 'omp'parameter, so Pi's call sites are touched even though their behavior is unchanged — Pi's four e2e tests and the full unit suite cover it. The rationale for keying on the agent rather than on a file-format capability object: the agent is one fact that determines both path and serialization, so the two cannot be mismatched.