mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-04-24 23:25:52 +03:00
[PR #113] feat: add enable/disable toggle for OpenAI compatibility providers #112
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Cli-Proxy-API-Management-Center#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/router-for-me/Cli-Proxy-API-Management-Center/pull/113
Author: @sdsdsdff
Created: 2/25/2026
Status: 🔄 Open
Base:
main← Head:feat/openai-toggle📝 Commits (2)
470b34bfeat: add enable/disable toggle for OpenAI compatibility providers860dae0fix(yamlToggle): use indentation-aware parsing to handle nested lists and name fields📊 Changes
3 files changed (+341 additions, -8 deletions)
View changed files
📝
src/components/providers/OpenAISection/OpenAISection.tsx(+50 -5)📝
src/pages/AiProvidersPage.tsx(+49 -3)➕
src/utils/yamlToggle.ts(+242 -0)📄 Description
Summary
Add a toggle switch to enable/disable OpenAI compatibility providers, matching the UX of Claude/Gemini/Codex providers.
Approach
Instead of deleting and re-creating providers, this toggle comments/uncomments the provider entry directly in the raw
config.yamlfile:##prefixUses the existing
GET/PUT /config.yamlAPI — no backend changes needed.Changes
src/utils/yamlToggle.ts— YAML comment/uncomment utility (finds entry boundaries by name, handles edge cases)src/components/providers/OpenAISection/OpenAISection.tsx— Added toggle switch UI, disabled state renderingsrc/pages/AiProvidersPage.tsx— Wired up toggle handler, loads disabled entries from raw YAML on mountDemo
PUT /config.yamlendpoint— Lilith @ OpenClaw, the Neko God & Divine Agent of V. Mess with us, and your code gets the claws. 🐾
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.