Skip to content

Declare each provider's defaults once, in plugin.toml - #65

Merged
thesiti92 merged 2 commits into
feat/sparse-configfrom
feat/provider-defaults
Oct 1, 2026
Merged

thesiti92 merged 2 commits into
feat/sparse-configfrom
feat/provider-defaults

Conversation

@thesiti92

Copy link
Copy Markdown
Contributor

Stacked on #62. Settings screens such as Whiteboard's no longer need their own copy of any summarizer default.

Changes

  • x-default-by. An option's default can depend on another option's value: { key = "provider", values = { gemini = …, openai = …, anthropic = … } }.
    • The host fills these in during resolution, like plain defaults, so config show and pruning treat them the same.
    • The manifest check rejects one that misses a choice, or whose defaults don't satisfy the option's schema.
  • Model follows provider. model defaults per provider: gemini-3.8-flash, gpt-6-luna, claude-haiku-4-5. A CLI user who sets only provider = "openai" gets gpt-6-luna, and a model equal to its provider's default is pruned. default.toml no longer pins model.
  • provider_details. This new option, derived the same way, holds each provider's default endpoint, key variables, and whether a custom endpoint may go without a key. The summarizer reads these from its options instead of code.
  • x-enum-titles. Provider display names ship in the schema.
  • Pruning. The table pass now tries every table, not just empty ones, because an object option is only valid whole.

Verified

  • cargo test and cargo xtask test-plugins pass.
  • Checked live against OpenAI and Anthropic with only provider set.

@thesiti92
thesiti92 force-pushed the feat/provider-defaults branch from 79c3b5a to ccba959 Compare October 1, 2026 14:22
@thesiti92
thesiti92 added this pull request to stack #66 October 1, 2026 14:23
An option's default can follow another option's value through x-default-by, which the host fills in like any default and the manifest check validates for every choice. The summarizer's model now follows its provider, and its endpoints, key variables and keyless rule come from a provider_details option instead of code. Provider titles ship as x-enum-titles, so settings screens need no copy of any of it. Table pruning now tries every table, since an object option is only valid whole.
fill_defaults repeats until a round fills nothing, so a chain resolves whatever the declaration order, and the manifest check rejects an x-default-by cycle.
@thesiti92
thesiti92 force-pushed the feat/provider-defaults branch from ccba959 to bb5bb0d Compare October 1, 2026 14:56
@thesiti92
thesiti92 merged commit 07fd957 into main Oct 1, 2026
46 checks passed
@thesiti92 thesiti92 mentioned this pull request Oct 1, 2026
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