Skip to content

port(omniroute): #6499 - prevent silent overwrite of existing API-key connections on edit - #269

Merged
bloodf merged 2 commits into
devfrom
port/omniroute-6499
Jul 16, 2026
Merged

bloodf merged 2 commits into
devfrom
port/omniroute-6499

Conversation

@bloodf

@bloodf bloodf commented Jul 16, 2026

Copy link
Copy Markdown
Owner

What

Port of OmniRoute PR #6499 (diegosouzapw/OmniRoute): editing a provider connection no longer silently overwrites an existing API-key connection on name collision.

Changes

  • src/app/api/providers/route.js — collision check before update; 409 on duplicate API-key connection
  • src/lib/db/repos/connectionsRepo.js — collision detection helper
  • dashboard/providers/[id]/page.js + AddApiKeyModal.js — surface the collision error instead of overwriting
  • Tests: tests/unit/api-key-connection-collision-6499.test.js (new), api-key-connection-name.test.js updated

Source

Upstream: diegosouzapw/OmniRoute#6499
Ported from TypeScript to durindoor JS.

Disclosure

Agent-generated port (kimi-k2.7, Oh My Pi harness), executed under the approved upstream-PR-import plan.

@bloodf
bloodf force-pushed the port/omniroute-6499 branch from b654486 to 998f74d Compare July 16, 2026 03:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 998f74d654

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js Outdated
@bloodf
bloodf force-pushed the port/omniroute-6499 branch from 998f74d to a048f8e Compare July 16, 2026 05:30
CortexOS and others added 2 commits July 16, 2026 18:08
… closed-to-open transition (#269)

Previously only the connection name was reset when reopening the add-key modal, leaving stale API keys, Azure endpoint/deployment, account IDs, regions, and Ollama host values intact. This allowed a duplicate connection using the previous secret to be saved.

- Add createAddApiKeyModalInitialState to apiKeyConnectionName.js to produce a fresh name, empty API key, and provider-specific defaults.

- Replace inline useState defaults in AddApiKeyModal with the helper and reset all state slices on closed->open.

- Add regression test asserting the fresh default state clears secrets and provider fields.

- Update docs/providers/omniroute-open-provider-catalog.md to note the reopen-clears behavior.

Closes Codex P2 thread on AddApiKeyModal.js:67.
@bloodf
bloodf force-pushed the port/omniroute-6499 branch from a048f8e to 0dfed55 Compare July 16, 2026 18:09
@bloodf
bloodf merged commit aa3ea91 into dev Jul 16, 2026
3 checks passed
@bloodf
bloodf deleted the port/omniroute-6499 branch July 17, 2026 02:50
@bloodf bloodf mentioned this pull request Jul 20, 2026
7 of 8 tasks
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