refactor(upstream): replace upstream account type with apikey, auto-append /antigravity
Upstream accounts now use the standard APIKey type instead of a dedicated upstream type. GetBaseURL() and new GetGeminiBaseURL() automatically append /antigravity for Antigravity platform APIKey accounts, eliminating the need for separate upstream forwarding methods. - Remove ForwardUpstream, ForwardUpstreamGemini, testUpstreamConnection - Remove upstream branch guards in Forward/ForwardGemini/TestConnection - Add migration 052 to convert existing upstream accounts to apikey - Update frontend CreateAccountModal to create apikey type - Add unit tests for GetBaseURL and GetGeminiBaseURL
This commit is contained in:
11
backend/migrations/052_migrate_upstream_to_apikey.sql
Normal file
11
backend/migrations/052_migrate_upstream_to_apikey.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Migrate upstream accounts to apikey type
|
||||
-- Background: upstream type is no longer needed. Antigravity platform APIKey accounts
|
||||
-- with base_url pointing to an upstream sub2api instance can reuse the standard
|
||||
-- APIKey forwarding path. GetBaseURL()/GetGeminiBaseURL() automatically appends
|
||||
-- /antigravity for Antigravity platform APIKey accounts.
|
||||
|
||||
UPDATE accounts
|
||||
SET type = 'apikey'
|
||||
WHERE type = 'upstream'
|
||||
AND platform = 'antigravity'
|
||||
AND deleted_at IS NULL;
|
||||
Reference in New Issue
Block a user