BeiBaiNian opened a new pull request, #204:
URL: https://github.com/apache/casbin-gateway/pull/204

   ## <span data-type="text" style="font-size: 1.38em;"># Why</span>
   
   A channel whose type the gateway cannot serve — claude or gemini — could 
still be created in the web UI, filled in with a base URL and an API key, and 
even tested. Every such action dead-ended in `the claude/gemini channel type is 
not supported yet in this stage`, because the gateway only speaks the OpenAI 
wire format (`BuildOpenAiUrl` / `forwardToChannel`). Letting users create 
channel types the product cannot talk to was a self-contradiction.
   
   ### # What changed
   
   - `object/channel.go`: narrowed `channelTypes` to `["openai", "custom"]`. 
`validateChannel` now rejects claude/gemini on create and update, and 
`IsChannelOpenAiCompatible` no longer treats them as usable. The "not 
supported" guard in `TestChannelConnectivity` / `channelUnusableReason` stays 
as a defensive fallback for legacy rows already in the database.
   - `web/src/ChannelEditPage.js`: the type dropdown offers only OpenAI/Custom; 
claude/gemini base-URL and model presets are removed; the "Test Connectivity" 
button and the upstream-URL hint are only shown for OpenAI-compatible types.
   - `web/src/ChannelListPage.js`: dropped the claude/gemini type-tag colors.
   
   ### # Verification
   
   - `go build ./object/ ./controllers/` passes.
   - `controllers/proxy_test.go` still exercises the "not supported" guard for 
a legacy claude channel.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to