@@ -74,47 +74,51 @@ type CodexQuotaBillingBalanceInfo struct {
7474}
7575
7676type AccountRecord struct {
77- ID string `json:"id"`
78- Provider string `json:"provider"`
79- CredentialSource string `json:"credentialSource"`
80- DisplayName string `json:"displayName"`
81- Status string `json:"status"`
82- Priority int `json:"priority,omitempty"`
83- Disabled bool `json:"disabled,omitempty"`
84- Email string `json:"email,omitempty"`
85- PlanType string `json:"planType,omitempty"`
86- Name string `json:"name,omitempty"`
87- APIKey string `json:"apiKey,omitempty"`
88- KeyFingerprint string `json:"keyFingerprint,omitempty"`
89- KeySuffix string `json:"keySuffix,omitempty"`
90- BaseURL string `json:"baseUrl,omitempty"`
91- Prefix string `json:"prefix,omitempty"`
92- ProxyURL string `json:"proxyUrl,omitempty"`
93- AuthIndex interface {} `json:"authIndex,omitempty"`
94- QuotaKey string `json:"quotaKey,omitempty"`
95- QuotaCurl string `json:"quotaCurl,omitempty"`
96- QuotaEnabled bool `json:"quotaEnabled,omitempty"`
97- LocalOnly bool `json:"localOnly,omitempty"`
98- SupportedFormats []string `json:"supportedFormats,omitempty"`
99- FormatBaseURLs map [string ]string `json:"formatBaseUrls,omitempty"`
100- BillingCurl string `json:"billingCurl,omitempty"`
101- BillingEnabled bool `json:"billingEnabled,omitempty"`
77+ ID string `json:"id"`
78+ Provider string `json:"provider"`
79+ CredentialSource string `json:"credentialSource"`
80+ DisplayName string `json:"displayName"`
81+ Status string `json:"status"`
82+ Priority int `json:"priority,omitempty"`
83+ Disabled bool `json:"disabled,omitempty"`
84+ Email string `json:"email,omitempty"`
85+ PlanType string `json:"planType,omitempty"`
86+ Name string `json:"name,omitempty"`
87+ APIKey string `json:"apiKey,omitempty"`
88+ APIKeys []string `json:"apiKeys,omitempty"`
89+ Headers map [string ]string `json:"headers,omitempty"`
90+ Models []OpenAICompatibleModel `json:"models,omitempty"`
91+ KeyFingerprint string `json:"keyFingerprint,omitempty"`
92+ KeySuffix string `json:"keySuffix,omitempty"`
93+ BaseURL string `json:"baseUrl,omitempty"`
94+ Prefix string `json:"prefix,omitempty"`
95+ ProxyURL string `json:"proxyUrl,omitempty"`
96+ AuthIndex interface {} `json:"authIndex,omitempty"`
97+ QuotaKey string `json:"quotaKey,omitempty"`
98+ QuotaCurl string `json:"quotaCurl,omitempty"`
99+ QuotaEnabled bool `json:"quotaEnabled,omitempty"`
100+ LocalOnly bool `json:"localOnly,omitempty"`
101+ SupportedFormats []string `json:"supportedFormats,omitempty"`
102+ FormatBaseURLs map [string ]string `json:"formatBaseUrls,omitempty"`
103+ BillingCurl string `json:"billingCurl,omitempty"`
104+ BillingEnabled bool `json:"billingEnabled,omitempty"`
102105}
103106
104107type CreateCodexAPIKeyInput struct {
105- APIKey string `json:"apiKey"`
106- Label string `json:"label,omitempty"`
107- BaseURL string `json:"baseUrl"`
108- FormatBaseURLs map [string ]string `json:"formatBaseUrls,omitempty"`
109- Priority int `json:"priority,omitempty"`
110- Prefix string `json:"prefix,omitempty"`
111- ProxyURL string `json:"proxyUrl,omitempty"`
112- Headers map [string ]string `json:"headers,omitempty"`
113- ExcludedModels []string `json:"excludedModels,omitempty"`
114- QuotaCurl string `json:"quotaCurl,omitempty"`
115- QuotaEnabled bool `json:"quotaEnabled,omitempty"`
116- BillingCurl string `json:"billingCurl,omitempty"`
117- BillingEnabled bool `json:"billingEnabled,omitempty"`
108+ APIKey string `json:"apiKey"`
109+ Label string `json:"label,omitempty"`
110+ BaseURL string `json:"baseUrl"`
111+ FormatBaseURLs map [string ]string `json:"formatBaseUrls,omitempty"`
112+ Priority int `json:"priority,omitempty"`
113+ Prefix string `json:"prefix,omitempty"`
114+ ProxyURL string `json:"proxyUrl,omitempty"`
115+ Headers map [string ]string `json:"headers,omitempty"`
116+ Models []OpenAICompatibleModel `json:"models,omitempty"`
117+ ExcludedModels []string `json:"excludedModels,omitempty"`
118+ QuotaCurl string `json:"quotaCurl,omitempty"`
119+ QuotaEnabled bool `json:"quotaEnabled,omitempty"`
120+ BillingCurl string `json:"billingCurl,omitempty"`
121+ BillingEnabled bool `json:"billingEnabled,omitempty"`
118122}
119123
120124type UpdateCodexAPIKeyPriorityInput struct {
@@ -128,15 +132,16 @@ type UpdateCodexAPIKeyLabelInput struct {
128132}
129133
130134type UpdateCodexAPIKeyConfigInput struct {
131- ID string `json:"id"`
132- APIKey string `json:"apiKey"`
133- BaseURL string `json:"baseUrl"`
134- Prefix string `json:"prefix,omitempty"`
135- ProxyURL string `json:"proxyUrl,omitempty"`
136- QuotaCurl string `json:"quotaCurl,omitempty"`
137- QuotaEnabled bool `json:"quotaEnabled,omitempty"`
138- BillingCurl string `json:"billingCurl,omitempty"`
139- BillingEnabled bool `json:"billingEnabled,omitempty"`
135+ ID string `json:"id"`
136+ APIKey string `json:"apiKey"`
137+ BaseURL string `json:"baseUrl"`
138+ Prefix string `json:"prefix,omitempty"`
139+ ProxyURL string `json:"proxyUrl,omitempty"`
140+ Models []OpenAICompatibleModel `json:"models,omitempty"`
141+ QuotaCurl string `json:"quotaCurl,omitempty"`
142+ QuotaEnabled bool `json:"quotaEnabled,omitempty"`
143+ BillingCurl string `json:"billingCurl,omitempty"`
144+ BillingEnabled bool `json:"billingEnabled,omitempty"`
140145}
141146
142147type TestCodexAPIKeyQuotaCurlInput struct {
@@ -160,6 +165,15 @@ type ProbeCodexAccountRoutingInput struct {
160165 AllowFallback bool `json:"allowFallback,omitempty"`
161166}
162167
168+ type ProbeClaudeCodeAccountRoutingInput struct {
169+ Model string `json:"model"`
170+ Attempts int `json:"attempts,omitempty"`
171+ AllowAccountIDs []string `json:"allowAccountIDs,omitempty"`
172+ DenyAccountIDs []string `json:"denyAccountIDs,omitempty"`
173+ OrderAccountIDs []string `json:"orderAccountIDs,omitempty"`
174+ AllowFallback bool `json:"allowFallback,omitempty"`
175+ }
176+
163177type UpdateOAuthModelAliasesInput struct {
164178 Channel string `json:"channel"`
165179 Models []OpenAICompatibleModel `json:"models,omitempty"`
@@ -184,6 +198,25 @@ type CodexAccountRoutingProbeAttempt struct {
184198 FinishedAt string `json:"finishedAt,omitempty"`
185199}
186200
201+ type ClaudeCodeAccountRoutingProbeResult struct {
202+ Model string `json:"model"`
203+ Attempts []ClaudeCodeAccountRoutingProbeAttempt `json:"attempts"`
204+ }
205+
206+ type ClaudeCodeAccountRoutingProbeAttempt struct {
207+ Index int `json:"index"`
208+ Success bool `json:"success"`
209+ StatusCode int `json:"statusCode,omitempty"`
210+ AccountID string `json:"accountID,omitempty"`
211+ AccountLabel string `json:"accountLabel,omitempty"`
212+ Provider string `json:"provider,omitempty"`
213+ Message string `json:"message,omitempty"`
214+ Evidence string `json:"evidence,omitempty"`
215+ ResponseBody string `json:"responseBody,omitempty"`
216+ StartedAt string `json:"startedAt,omitempty"`
217+ FinishedAt string `json:"finishedAt,omitempty"`
218+ }
219+
187220type OpenAICompatibleProvider struct {
188221 Name string `json:"name"`
189222 Priority int `json:"priority,omitempty"`
0 commit comments