Fix API route mismatches from OpenAPI migration#531
Conversation
- ChatGPT OAuth: `/providers/openai/oauth/browser/*` → `/providers/openai/browser-oauth/*` - Raw config editor: `/config/raw` → `/settings/raw` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughThe file Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| const response = await fetch( | ||
| `${getApiBase()}/providers/openai/oauth/browser/status?state=${encodeURIComponent(state)}`, | ||
| `${getApiBase()}/providers/openai/browser-oauth/status?state=${encodeURIComponent(state)}`, | ||
| ); |
There was a problem hiding this comment.
Minor readability: consider building this URL with URL + searchParams instead of interpolating the query string (easier to extend, avoids subtle encoding mistakes).
| // Raw config API | ||
| rawConfig: () => fetchJson<Types.RawConfigResponse>("/config/raw"), | ||
| rawConfig: () => fetchJson<Types.RawConfigResponse>("/settings/raw"), | ||
| updateRawConfig: async (content: string) => { |
There was a problem hiding this comment.
Since this moved from /config/raw to /settings/raw, docs/design-docs/secret-store.md still references GET /api/config/raw in a few places; might be worth updating to prevent future drift/confusion.
Summary
/providers/openai/oauth/browser/*but backend serves/providers/openai/browser-oauth/*/config/rawbut backend serves/settings/rawTest plan
Note
This PR fixes two client-side API route mismatches that occurred after an OpenAPI migration. The changes align the frontend API calls with the actual backend endpoints, restoring functionality for ChatGPT OAuth initialization and the raw configuration file editor.
Written by Tembo for commit 1b1e14f. This will update automatically on new commits.