Repository navigation
feat(prompts): every prompt in the folder, for every model - #7
Merged
Merged
Conversation
Pi asks a caller to describe a model it does not ship, and part of that description is which optional request fields the endpoint accepts. It sends per-tool `eager_input_streaming` by default, which strict Anthropic-compatible endpoints reject outright with a 400 naming the field, and the only lever is `compat` on the model. So `pi_compat` on a model is passed through verbatim into the generated extension. Verbatim rather than mirrored as typed fields: the flag names are pi's vocabulary and a copy of them here would go stale without saying so. It goes on the model because that is where pi reads it. The same object on the provider is accepted in silence and changes nothing about the request, which fails as a 400 from the endpoint with nothing local to point at.
Prompt files were bound to a model by their name: a stem had to be the model's id or a prefix of it. That tied a prompt to the id it happened to be named after, so one written for a task or a house style could not be given to two unrelated models, a file named after nothing was invisible until `a` was pressed, and an endpoint routing by its own scheme matched nothing at all, silently. The folder is now the menu. Every .md is offered for every model, and the one that starts checked is whatever `prompt` names, which any model can set to any file. `matches_for` and the `a` toggle are gone with the prefix rule, and so is the fallback on the id: a name that looks like a model's is a coincidence the config never declared. A `prompt` naming no file is reported rather than dropped: a yellow line under the list in the panel, a stderr warning when the command line answered every screen and the panel is never drawn. JSON schema 4: a model's `prompts` list became a single `prompt`, since there are no candidates left to rank.
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.
Two commits.
feat(pi): a model can carrypi_compat, passed verbatim into the generated pi extension. Pi sends per-tooleager_input_streamingby default and strict Anthropic-compatible endpoints answer that with a 400 naming the field;compaton the model is the only lever. Verbatim rather than mirrored as typed fields, since the flag names are pi's vocabulary. It sits on the model because that is where pi reads it: the same object on a provider is accepted in silence and changes nothing.feat(prompts): prompt files are no longer matched against the model id.matches_forand its prefix rule are gone, along with theatoggle that listed the files the rule had hidden. The panel now lists every.mdin the folder for every model, and the one that starts checked is whatever the model'spromptnames, which can be any file in there. The fallback on the id is gone too: noprompt, no file checked.A
promptnaming a file the folder does not hold used to end as a launch quietly missing its system prompt. It is now a line under the list in the panel, and a stderr warning on the path where the command line answered every screen and the panel is never drawn.--mdand--no-mdare unchanged and still win over the model's own file.resolve_promptshandles only those two flags now.Config compatibility: the
promptkey keeps its name and its shape. Apromptthat relied on the prefix rule to cover a family (orca-v4reachingorca-v4-pro) has to name a file that exists; one file no longer covers several models by name, it covers them by being named in each.JSON schema goes to 4: a model's
promptsarray became a singlepromptstring, since there is no candidate list left to rank.README and
config.example.tomlfollow. 106 tests pass, clippy is clean at-D warnings, and the four launch paths were checked against a real config: a model with aprompt, one without, one whosepromptnames nothing, and--mdover each.