docs(agent-workflows): plan for custom providers + model auth in Pi#5013
Draft
mmabrouk wants to merge 1 commit into
Draft
docs(agent-workflows): plan for custom providers + model auth in Pi#5013mmabrouk wants to merge 1 commit into
mmabrouk wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
New plan-feature workspace for making provider + model auth work end to end on the Pi harness, custom providers included. Builds on provider-model-auth (BUILT) and model-config (DESIGNED). Diagnoses five gaps and sequences five slices. Claude-Session: https://claude.ai/code/session_01HCMtsTWnCdh8fPEzGrda6C
45f71ea to
c89be77
Compare
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.
Problem
A user selects a model and a provider for a Pi agent. Built-in providers work once a
provider_keyis stored (OpenRouter works this way: Pi ships 253 built-in OpenRouter models). Custom providers do not work on Pi, requested models can drop silently, and one provider is mis-mapped. This is a docs-only plan-feature workspace that diagnoses the gaps and sequences the fix. No code changes.The five gaps (verified 2026-07-02)
custom_providerwhose kind is a known direct provider (OpenRouter, OpenAI) resolves withdeployment=<kind>inconnections.py_custom_provider_candidate, notdeployment="direct". Pi advertisesdeployments=["direct"], so_check_harness_post_resolveraisesUnsupportedDeploymentErrorbefore the runner runs. This is why "OpenRouter works as a provider_key but not as a custom provider."models.jsonis written anywhere inservices/runner/src/;endpoint.baseUrlis applied for Claude only. A custom base URL and genuinely custom model ids never reach Pi.applyModelfalls back to the harness default whensetModelfails; strict is wired for Claude only. A requested-but-unsettable model returns HTTP 200 on the wrong model.buildModelOptionGroupsreads only the static harness catalog; each vault custom-provider'smodelsarray is dropped at theVaultConnectionEntrytype boundary.TOGETHERAI_API_KEY; Pi readsTOGETHER_API_KEY. Duplicated across three files, already drifted onminimax.The plan (recommended order)
together_ai -> TOGETHER_API_KEYin all three maps, add missingminimax. Independent quick win.custom_providertodeployment="direct"at resolve time. The fastest unblock: one resolver change makes a custom OpenRouter/OpenAI work on Pi for any built-in id, no runner or frontend work (the resolved env already carries the right*_API_KEY).auth.json(keys as"$ENV"references) andmodels.json(base URL override plus custom model) intoPI_CODING_AGENT_DIR, local and Daytona. All inputs already rideresolved_connection+secrets; no wire change.ModelNotSettableError,AGENTA_AGENT_MODEL_STRICT(default false, flip later), fixallowedModelsto readc.value.models?toVaultConnectionEntry, merge under the harness filter) plus the static grouped-choice baseline.Every contract this plan touches (the
deploymentfield, themodels.jsonshape, the picker-choices source,AGENTA_AGENT_MODEL_STRICT, the wire boundary) is classified by semantic role indesign.md(the design-interfaces pass on paper). Open decisions and non-goals (Bedrock/Vertex/Azure on Pi stay fail-loud; no vault storage change; no new wire field) are recorded instatus.md.Builds on
docs/design/agent-workflows/projects/provider-model-auth/(BUILT, PR feat(agent): provider/model/connection for agent harnesses #4815): the connection resolver, theResolvedConnectioncontract, the harness capability table, clear-then-apply.docs/design/agent-workflows/projects/model-config/(DESIGNED, not built): the Piauth.json/models.jsonwrite, fail-loud model, model choices per harness.Appendix (not a slice): the Pi startup-banner leak in
otel.tsisBannerLine(does not match pi-acp's newerExtensionssection or.jspaths) is a related, separately shippable fix.https://claude.ai/code/session_01HCMtsTWnCdh8fPEzGrda6C