Skip to content

Fix API route mismatches from OpenAPI migration#531

Merged
jamiepine merged 1 commit intomainfrom
fix/api-route-mismatches
Apr 4, 2026
Merged

Fix API route mismatches from OpenAPI migration#531
jamiepine merged 1 commit intomainfrom
fix/api-route-mismatches

Conversation

@jamiepine
Copy link
Copy Markdown
Member

@jamiepine jamiepine commented Apr 4, 2026

Summary

  • Fix ChatGPT OAuth device flow routes: client was calling /providers/openai/oauth/browser/* but backend serves /providers/openai/browser-oauth/*
  • Fix raw config editor routes: client was calling /config/raw but backend serves /settings/raw

Test plan

  • Open ChatGPT Plus OAuth modal in Settings — should start device code flow without error
  • Open raw config editor in Settings — should load and display config.toml

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.

- 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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 4, 2026

Walkthrough

The file interface/src/api/client.ts was updated to reflect API endpoint path changes. OpenAI OAuth browser endpoints were reorganized from /providers/openai/oauth/browser/ to /providers/openai/browser-oauth/, and raw configuration endpoints were migrated from /config/raw to /settings/raw.

Changes

Cohort / File(s) Summary
API Client Endpoint Updates
interface/src/api/client.ts
Four endpoint paths updated: OpenAI OAuth browser methods now use /browser-oauth/ instead of /oauth/browser/, and raw config methods now reference /settings/raw instead of /config/raw.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: fixing API route mismatches caused by an OpenAPI migration, which directly aligns with the two endpoint path corrections in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly explains the two bug fixes (ChatGPT OAuth routes and raw config routes) and aligns with the changeset modifications to endpoint URLs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/api-route-mismatches

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.

❤️ Share

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

@jamiepine jamiepine merged commit 10439a1 into main Apr 4, 2026
5 checks passed
const response = await fetch(
`${getApiBase()}/providers/openai/oauth/browser/status?state=${encodeURIComponent(state)}`,
`${getApiBase()}/providers/openai/browser-oauth/status?state=${encodeURIComponent(state)}`,
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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