Skip to content

feat(prompts): every prompt in the folder, for every model - #7

Merged
klNuno merged 2 commits into
mainfrom
feat/pick-any-prompt
Aug 13, 2026
Merged

klNuno merged 2 commits into
mainfrom
feat/pick-any-prompt

Conversation

@klNuno

@klNuno klNuno commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Two commits.

feat(pi): a model can carry pi_compat, passed verbatim into the generated pi extension. Pi sends per-tool eager_input_streaming by default and strict Anthropic-compatible endpoints answer that with a 400 naming the field; compat on 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_for and its prefix rule are gone, along with the a toggle that listed the files the rule had hidden. The panel now lists every .md in the folder for every model, and the one that starts checked is whatever the model's prompt names, which can be any file in there. The fallback on the id is gone too: no prompt, no file checked.

A prompt naming 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.

--md and --no-md are unchanged and still win over the model's own file. resolve_prompts handles only those two flags now.

Config compatibility: the prompt key keeps its name and its shape. A prompt that relied on the prefix rule to cover a family (orca-v4 reaching orca-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 prompts array became a single prompt string, since there is no candidate list left to rank.

README and config.example.toml follow. 106 tests pass, clippy is clean at -D warnings, and the four launch paths were checked against a real config: a model with a prompt, one without, one whose prompt names nothing, and --md over each.

klNuno added 2 commits August 11, 2026 13:10
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.
@klNuno
klNuno merged commit d181341 into main Aug 13, 2026
5 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.

1 participant