Skip to content

[eng-2724] Configure Pi with every model the key can use, not just one - #43

Merged
lavicosa merged 2 commits into
mainfrom
feat/eng-2724-pi-configure-approved-models
Nov 30, 2026
Merged

lavicosa merged 2 commits into
mainfrom
feat/eng-2724-pi-configure-approved-models

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Ticket: ENG-2724

Summary

A customer asked for multiple models when configuring Pi once from requesty and then running plain pi. Configure wrote only the picked model into ~/.pi/agent/models.json.

Configure now writes the same entries requesty pi builds with fetchCatalog (the key's approved models from /v1/models plus managed policies), with the picked model first:

models = [piCatalogModelFrom(picked) with its catalog cost] + catalog (minus picked)
  • The picked model stays defaultModel in settings.json.
  • Entries are piCatalogModel (name, reasoning, image input, cost), as in requesty pi, so Pi does not treat switched-to models as text-only. piModelConfig is gone.
  • A reconfigure replaces the requesty provider's model list, so models from a previous key the new key cannot use do not linger. Other providers are untouched.
  • If discovery fails, only the picked model is written, as before.
  • The list is a snapshot from configure time; newly approved models need a reconfigure (requesty pi stays live).

Tests: the existing Pi tests run against a local router that fails discovery, and TestPiHarnessConfigureListsEveryModelTheProfileCanUse covers ordering, policies, deduping the picked model and replacing an old list.


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

Co-Authored-By: thibault <thibault.jaigu@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

…just one

Co-Authored-By: thibault <thibault.jaigu@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@lavicosa
lavicosa merged commit dae3f80 into main Nov 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants