Skip to content

fix(web): point provider calls at routes that exist - #105

Closed
elkaix wants to merge 2 commits into
mainfrom
feat/web-provider-routes
Closed

fix(web): point provider calls at routes that exist#105
elkaix wants to merge 2 commits into
mainfrom
feat/web-provider-routes

Conversation

@elkaix

@elkaix elkaix commented Aug 17, 2026

Copy link
Copy Markdown
Member

Related Issue

No issue. The problem is described below.

Problem

Three of the four provider calls in the web client pointed at routes that do not exist. addProvider posted to /providers, deleteProvider deleted /providers/{id}, and refreshProvider posted to /providers/{id}:refresh, while the server registers only GET /providers and GET /providers/{provider_id}. The client marked the whole block "PRESUMED". The result is that "Add provider" in the web UI could not work against a real daemon, which is the first thing a new user reaches on a fresh install.

What changed

  • addProvider writes one POST /config patch carrying the provider, a model alias, and default_model, then reads the created provider back.
  • refreshProvider re-reads GET /providers/{id}.
  • deleteProvider calls a new DELETE /providers/{provider_id} route. Removal cannot go through POST /config: the config patch is a deep merge and undefined is stripped, so a key can never be removed that way. The route is wired to the existing removePythinkerProvider RPC, which also drops the model aliases that referenced the provider.
  • The "PRESUMED" comments are gone from every method that now points at a real route.

Verified locally: 3594 agent-core tests, 512 server tests, 329 web tests, three typechecks, and lint all pass.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

The web client posted to POST /providers, DELETE /providers/{id} and
POST /providers/{id}:refresh. None of those routes were ever registered, so
adding an API key from the desktop app returned 404 and a new user could not
configure a provider at all.

Adding a provider now writes one POST /config patch carrying the provider, a
model alias and default_model, which is what GET /auth needs before it reports
ready. Refresh reads the real GET /providers/{id}.

Removal cannot go through POST /config, because the config patch deep-merges and
strips undefined, so a key can never be cleared. A removePythinkerProvider RPC
already existed with no HTTP route; this adds DELETE /providers/{provider_id}
wired to it, which also cleans up model aliases pointing at the removed provider.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@elkaix, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Limit details: You’ve used all 3 included reviews currently available under your plan.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fa46465b-1f18-4dbc-abb4-5e18b168ba2c

📥 Commits

Reviewing files that changed from the base of the PR and between f97b801 and eee3ca4.

📒 Files selected for processing (9)
  • .changeset/web-provider-routes.md
  • apps/pythinker-web/src/api/daemon/client.ts
  • apps/pythinker-web/test/daemon-contracts.test.ts
  • packages/agent-core/src/services/modelCatalog/modelCatalog.ts
  • packages/agent-core/src/services/modelCatalog/modelCatalogService.ts
  • packages/agent-core/test/services/config-service.test.ts
  • packages/agent-core/test/services/model-catalog-service.test.ts
  • packages/server/src/routes/modelCatalog.ts
  • packages/server/test/model-catalog.e2e.test.ts

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 17, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@eee3ca4
npx https://pkg.pr.new/@pymodel/pythinker-code@eee3ca4

commit: eee3ca4

@elkaix

elkaix commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

Closing: merged locally into main; a new PR will follow.

@elkaix elkaix closed this Aug 17, 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.

1 participant