Skip to content

Keep Tolk's model catalog out of the published config and merge a site's models into it by id (T11.6) - #2

Merged
afonic merged 2 commits into
mainfrom
model-catalog-merge
Oct 10, 2026
Merged

afonic merged 2 commits into
mainfrom
model-catalog-merge

Conversation

@afonic

@afonic afonic commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Why

mergeConfigFrom merges top-level keys only. A site that published config/tolk.php to change any value, concurrency for example, froze the whole model catalog: no later release of Tolk could add a model there or fix a price or a request option.

1.0.0-beta.1's copy shows the cost. It sends Claude Haiku 5.5 the between_tools thinking option, which Anthropic refuses (T13.4), so Haiku calls fail on every site that published the config from beta.1.

What changes

  • Tolk's catalog moves from config/tolk.php to resources/models.php, which only Tolk releases change. config/tolk.php ships models.anthropic, models.openai and models.gemini as empty lists.
  • ModelCatalog::forProvider() merges a site's entries into Tolk's by id:
    • An entry with the id of one of Tolk's models replaces only the top-level keys it names and keeps its place. The model's other keys still get Tolk's updates. options and price are replaced whole.
    • An entry with any other id adds a model after Tolk's models, so Tolk's first model of each tier stays the default. A site can change that by giving Tolk's model another tier, or by choosing a model in the settings.
    • An entry without a string id is ignored.
  • A site can no longer remove one of Tolk's models.
  • The tests that replaced a provider's catalog, or edited it by index, now change Tolk's entries by id. A missing tier is now tested by giving Tolk's model another tier. RequestShapeTest read the config's list, which is now empty, so it passed without sending a request; it now reads the catalog.
  • Docs: configuration.md (the catalog section, an example, and a note for configs published from 1.0.0-beta.1), troubleshooting.md, the Boost guideline and CHANGELOG.md, which tells beta.1 sites to delete their copied models entries or keep only the keys they changed.

Tracked as T11.6 in TASKS.md.

Not in this PR

  • A catalog feed published by Reach and cached by each site, so that Automatic follows new models without a release.
  • Using the providers' model lists for availability and retirement notices.

Checks

  • vendor/bin/pest --parallel: 3,345 passed
  • vendor/bin/pint --test: clean
  • npm run cp:build: no change to resources/dist/build
  • Sandbox, through tinker: a site that reprices Claude Sonnet 5.5 keeps Sonnet's other keys, an added Claude Opus 5.5 is listed after Haiku, and Sonnet stays the quality default. tolk:doctor reports OK.

afonic added 2 commits October 9, 2026 23:12
…e's models into it by id, so each update of Tolk brings its new models, prices and options to every site (T11.6)
@afonic
afonic merged commit cb1f739 into main Oct 10, 2026
14 checks passed
@afonic
afonic deleted the model-catalog-merge branch October 10, 2026 07:29
afonic added a commit that referenced this pull request Oct 15, 2026
Keep Tolk's model catalog out of the published config and merge a site's models into it by id (T11.6)
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