eggpool 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. eggpool/__init__.py +5 -0
  2. eggpool/__main__.py +7 -0
  3. eggpool/_share/.env.example +9 -0
  4. eggpool/_share/config.example.toml +551 -0
  5. eggpool/accounts/__init__.py +1 -0
  6. eggpool/accounts/registry.py +181 -0
  7. eggpool/accounts/state.py +170 -0
  8. eggpool/api/__init__.py +1 -0
  9. eggpool/api/chat_completions.py +31 -0
  10. eggpool/api/errors.py +51 -0
  11. eggpool/api/messages.py +31 -0
  12. eggpool/api/models.py +76 -0
  13. eggpool/api/proxy_request.py +242 -0
  14. eggpool/api/stats.py +284 -0
  15. eggpool/app.py +893 -0
  16. eggpool/auth.py +92 -0
  17. eggpool/background/__init__.py +147 -0
  18. eggpool/background/cleanup.py +206 -0
  19. eggpool/catalog/__init__.py +1 -0
  20. eggpool/catalog/cache.py +645 -0
  21. eggpool/catalog/fetcher.py +188 -0
  22. eggpool/catalog/limits.py +306 -0
  23. eggpool/catalog/normalizer.py +119 -0
  24. eggpool/catalog/pricing.py +438 -0
  25. eggpool/catalog/protocols.py +194 -0
  26. eggpool/catalog/service.py +920 -0
  27. eggpool/cli.py +1481 -0
  28. eggpool/constants.py +34 -0
  29. eggpool/dashboard/__init__.py +3 -0
  30. eggpool/dashboard/_resources.py +14 -0
  31. eggpool/dashboard/escape.py +104 -0
  32. eggpool/dashboard/render.py +1448 -0
  33. eggpool/dashboard/routes.py +451 -0
  34. eggpool/dashboard/static/chart.umd.min.js +20 -0
  35. eggpool/dashboard/static/dashboard.css +341 -0
  36. eggpool/dashboard/static/favicon.svg +23 -0
  37. eggpool/dashboard/theme.py +514 -0
  38. eggpool/dashboard/themes/Booberry.toml +42 -0
  39. eggpool/dashboard/themes/Catppuccin Latte.toml +42 -0
  40. eggpool/dashboard/themes/Catppuccin Macchiato.toml +42 -0
  41. eggpool/dashboard/themes/Catppuccin Mocha.toml +42 -0
  42. eggpool/dashboard/themes/Cyber Red.toml +42 -0
  43. eggpool/dashboard/themes/Cyberpunk.toml +42 -0
  44. eggpool/dashboard/themes/Dark Green.toml +43 -0
  45. eggpool/dashboard/themes/Discord (80_ Saturation).toml +50 -0
  46. eggpool/dashboard/themes/Discord.toml +50 -0
  47. eggpool/dashboard/themes/Dracula.toml +42 -0
  48. eggpool/dashboard/themes/Ferra Light.toml +42 -0
  49. eggpool/dashboard/themes/Flexor Dark.toml +42 -0
  50. eggpool/dashboard/themes/Gruvbox.toml +42 -0
  51. eggpool/dashboard/themes/Halcyon Dark.toml +42 -0
  52. eggpool/dashboard/themes/IntelliJ Light.toml +42 -0
  53. eggpool/dashboard/themes/Kanagawa.toml +42 -0
  54. eggpool/dashboard/themes/Macaw Dark.toml +42 -0
  55. eggpool/dashboard/themes/Macaw Light.toml +42 -0
  56. eggpool/dashboard/themes/Matrix.toml +42 -0
  57. eggpool/dashboard/themes/Noctis Lilac.toml +42 -0
  58. eggpool/dashboard/themes/Nord.toml +42 -0
  59. eggpool/dashboard/themes/Nostromo Terminal.toml +42 -0
  60. eggpool/dashboard/themes/One Dark.toml +42 -0
  61. eggpool/dashboard/themes/Oxocarbon.toml +42 -0
  62. eggpool/dashboard/themes/Rose Pine Dawn.toml +42 -0
  63. eggpool/dashboard/themes/Rose Pine Moon.toml +42 -0
  64. eggpool/dashboard/themes/Rose Pine.toml +42 -0
  65. eggpool/dashboard/themes/Solarized Dark.toml +42 -0
  66. eggpool/dashboard/themes/Sonokai.toml +42 -0
  67. eggpool/dashboard/themes/Tokyo Night Storm.toml +42 -0
  68. eggpool/dashboard/themes/VESPER.toml +42 -0
  69. eggpool/dashboard/themes/Zenburn.toml +42 -0
  70. eggpool/dashboard/themes/acton.toml +42 -0
  71. eggpool/dashboard/themes/bam.toml +42 -0
  72. eggpool/dashboard/themes/base16-atelier-forest-light.toml +45 -0
  73. eggpool/dashboard/themes/berlin.toml +42 -0
  74. eggpool/dashboard/themes/black but with important highlights.toml +42 -0
  75. eggpool/dashboard/themes/broc.toml +42 -0
  76. eggpool/dashboard/themes/cork.toml +42 -0
  77. eggpool/dashboard/themes/ferra.toml +42 -0
  78. eggpool/dashboard/themes/forest.toml +42 -0
  79. eggpool/dashboard/themes/lisbon.toml +42 -0
  80. eggpool/dashboard/themes/midnight.toml +42 -0
  81. eggpool/dashboard/themes/oslo.toml +42 -0
  82. eggpool/dashboard/themes/plum.toml +43 -0
  83. eggpool/dashboard/themes/portland.toml +42 -0
  84. eggpool/dashboard/themes/sunset.toml +42 -0
  85. eggpool/dashboard/themes/tofino.toml +42 -0
  86. eggpool/dashboard/themes/vanimo.toml +42 -0
  87. eggpool/dashboard/themes/vik.toml +42 -0
  88. eggpool/db/__init__.py +0 -0
  89. eggpool/db/connection.py +401 -0
  90. eggpool/db/migrations.py +125 -0
  91. eggpool/db/repositories.py +989 -0
  92. eggpool/db/schema/0001_initial.sql +78 -0
  93. eggpool/db/schema/0002_indexes.sql +24 -0
  94. eggpool/db/schema/0003_request_attempts.sql +20 -0
  95. eggpool/db/schema/0004_integration_hardening.sql +34 -0
  96. eggpool/db/schema/0005_price_microdollars.sql +15 -0
  97. eggpool/db/schema/0006_correct_price_microdollars.sql +12 -0
  98. eggpool/db/schema/0007_price_cache_rates.sql +5 -0
  99. eggpool/db/schema/0008_proxy_request_identity.sql +9 -0
  100. eggpool/db/schema/0009_model_protocol_source.sql +3 -0
  101. eggpool/db/schema/0010_health_probe.sql +5 -0
  102. eggpool/db/schema/0011_model_resolution_status.sql +1 -0
  103. eggpool/db/schema/0012_drop_reservations_estimated_microdollars.sql +6 -0
  104. eggpool/db/schema/0013_request_attempts_account_id_index.sql +7 -0
  105. eggpool/db/schema/0014_bandwidth_tracking.sql +2 -0
  106. eggpool/db/schema/0015_multi_provider.sql +23 -0
  107. eggpool/db/schema/0016_requests_provider_id.sql +2 -0
  108. eggpool/db/schema/0017_price_snapshots_provider_id.sql +4 -0
  109. eggpool/db/schema/0018_provider_pings.sql +16 -0
  110. eggpool/db/schema/0019_client_ip.sql +4 -0
  111. eggpool/db/schema/0020_performance_indexes.sql +19 -0
  112. eggpool/db/schema/0021_provider_model_metadata.sql +19 -0
  113. eggpool/db/schema/0022_dashboard_indexes.sql +14 -0
  114. eggpool/db/schema/checksums.json +26 -0
  115. eggpool/deploy/__init__.py +126 -0
  116. eggpool/errors.py +123 -0
  117. eggpool/health/__init__.py +8 -0
  118. eggpool/health/circuit_breaker.py +146 -0
  119. eggpool/health/health_manager.py +339 -0
  120. eggpool/integrations/__init__.py +1 -0
  121. eggpool/integrations/opencode.py +90 -0
  122. eggpool/logging.py +50 -0
  123. eggpool/models/__init__.py +0 -0
  124. eggpool/models/api.py +32 -0
  125. eggpool/models/config.py +658 -0
  126. eggpool/models/database.py +99 -0
  127. eggpool/models/domain.py +59 -0
  128. eggpool/onboard.py +111 -0
  129. eggpool/providers/__init__.py +0 -0
  130. eggpool/providers/_templates.toml +574 -0
  131. eggpool/providers/client_pool.py +131 -0
  132. eggpool/providers/connect.py +988 -0
  133. eggpool/providers/contract.py +91 -0
  134. eggpool/providers/pproxy_transport.py +293 -0
  135. eggpool/proxy/__init__.py +1 -0
  136. eggpool/proxy/client.py +140 -0
  137. eggpool/proxy/sse_observer.py +283 -0
  138. eggpool/proxy/usage.py +114 -0
  139. eggpool/py.typed +1 -0
  140. eggpool/quota/__init__.py +13 -0
  141. eggpool/quota/estimation.py +639 -0
  142. eggpool/quota/reservation.py +193 -0
  143. eggpool/quota/scorer.py +215 -0
  144. eggpool/request/__init__.py +13 -0
  145. eggpool/request/attempt_finalizer.py +125 -0
  146. eggpool/request/body.py +70 -0
  147. eggpool/request/coordinator.py +1638 -0
  148. eggpool/request/finalizer.py +392 -0
  149. eggpool/request/limits.py +152 -0
  150. eggpool/retry/__init__.py +7 -0
  151. eggpool/retry/classification.py +207 -0
  152. eggpool/routing/__init__.py +1 -0
  153. eggpool/routing/eligibility.py +95 -0
  154. eggpool/routing/provider.py +20 -0
  155. eggpool/routing/router.py +395 -0
  156. eggpool/security/__init__.py +7 -0
  157. eggpool/security/redaction.py +327 -0
  158. eggpool/stats/__init__.py +37 -0
  159. eggpool/stats/queries.py +598 -0
  160. eggpool/stats/service.py +548 -0
  161. eggpool/toml_edit.py +101 -0
  162. eggpool-0.1.0.dist-info/METADATA +512 -0
  163. eggpool-0.1.0.dist-info/RECORD +166 -0
  164. eggpool-0.1.0.dist-info/WHEEL +4 -0
  165. eggpool-0.1.0.dist-info/entry_points.txt +2 -0
  166. eggpool-0.1.0.dist-info/licenses/LICENSE +21 -0
eggpool/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """EggPool - Python proxy that aggregates OpenCode Go subscriptions."""
2
+
3
+ from __future__ import annotations
4
+
5
+ __version__ = "0.1.0"
eggpool/__main__.py ADDED
@@ -0,0 +1,7 @@
1
+ """Allow running as `python -m eggpool`."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from eggpool.cli import main
6
+
7
+ main()
@@ -0,0 +1,9 @@
1
+ # EggPool environment variables
2
+ #
3
+ # API keys are now stored inline in config.toml via the `connect` command.
4
+ # This file is only needed if you use api_key_env (env var) instead of inline keys.
5
+ #
6
+ # Example:
7
+ # OPENCODE_GO_KEY=sk-your-opencode-go-key
8
+ #
9
+ # See config.example.toml for all available configuration options.
@@ -0,0 +1,551 @@
1
+ [server]
2
+ host = "0.0.0.0"
3
+ port = 11300
4
+ # api_key = "ep_..." # Auto-generated on first `configsetup`; use `eggpool newkey` to regenerate
5
+ log_level = "INFO"
6
+ access_log = true
7
+
8
+ [upstream]
9
+ base_url = "https://opencode.ai/zen/go/v1"
10
+ connect_timeout_s = 5
11
+ read_timeout_s = 300
12
+ write_timeout_s = 30
13
+ max_connections = 100
14
+ max_keepalive = 20
15
+ keepalive_timeout_s = 30
16
+
17
+ [database]
18
+ path = "usage.sqlite3"
19
+ busy_timeout_ms = 5000
20
+ wal = true
21
+ synchronous = "NORMAL"
22
+
23
+ [models]
24
+ # How often to refresh the model catalog from upstream providers (seconds).
25
+ # Also serves as the provider ping interval — each GET /models call measures
26
+ # latency and records health data.
27
+ refresh_interval_s = 300
28
+ expose_mode = "union"
29
+ startup_refresh = true
30
+ stale_after_s = 7200
31
+ allow_stale_catalog = true
32
+ # How many days to retain provider ping data.
33
+ ping_retain_days = 7
34
+
35
+ [routing]
36
+ strategy = "quota_fair"
37
+ near_tie_epsilon = 0.1
38
+ max_retries_before_stream = 3
39
+ unknown_request_reservation_microdollars = 1000000
40
+ inflight_penalty = 100000
41
+ health_penalty = 500000
42
+ randomize_near_ties = true
43
+ quota_exhausted_cooldown_seconds = 300
44
+
45
+ [limits]
46
+ five_hour_microdollars = 12000000
47
+ weekly_microdollars = 30000000
48
+ monthly_microdollars = 60000000
49
+
50
+ [dashboard]
51
+ enabled = true
52
+ public = true
53
+ # Theme name (without .toml extension). "default" uses GitHub Primer colors.
54
+ # Themes are from Halloy: https://themes.halloy.chat/
55
+ # Bundled themes (50+) ship inside the package — no extra files needed.
56
+ # To add custom themes, set themes_dir to a directory of .toml theme files.
57
+ # Custom themes are merged with the bundled set (same-name custom themes
58
+ # take precedence over bundled ones).
59
+ theme = "Cyber Red"
60
+ # themes_dir = "themes" # Uncomment to add custom themes alongside bundled ones
61
+ retain_request_stats_days = 30
62
+ store_request_content = false
63
+ refresh_interval_s = 60
64
+
65
+ [security]
66
+ allowed_hosts = []
67
+ cors_origins = []
68
+ redact_headers = ["authorization", "x-api-key"]
69
+ persist_redacted_error_detail = false
70
+
71
+ # Optional outbound proxies. Omit this section for direct upstream connections.
72
+ # Values use pproxy URI syntax:
73
+ # https://pypi.org/project/pproxy/#uri-syntax
74
+ # Use url_env instead of url when the proxy URI contains credentials.
75
+ # [proxies.residential-us]
76
+ # url = "socks5://127.0.0.1:1080"
77
+ #
78
+ # [proxies.datacenter-eu]
79
+ # url_env = "GOROUTER_DATACENTER_EU_PROXY_URL"
80
+
81
+ # ─── Provider Accounts ─────────────────────────────────────────────────
82
+ # Use `eggpool connect` to add providers interactively. This is the
83
+ # recommended way to configure accounts — it handles API key storage,
84
+ # config file updates, and server reload automatically.
85
+ #
86
+ # Manual configuration is possible but not recommended. If you prefer
87
+ # editing this file directly, uncomment and customize the examples below.
88
+ # Authenticated providers need an `api_key` (inline) or `api_key_env` (env var
89
+ # name). Providers with `auth.mode = "none"` need neither.
90
+
91
+ # [providers.opencode-go]
92
+ # id = "opencode-go"
93
+ # base_url = "https://opencode.ai/zen/go/v1"
94
+ # protocols = ["openai", "anthropic"]
95
+ #
96
+ # [[providers.opencode-go.accounts]]
97
+ # name = "personal"
98
+ # api_key = "sk-your-opencode-go-key"
99
+ # # Optional per-key proxy. Omit this field for the default direct connection.
100
+ # # proxy = "residential-us"
101
+ # # proxy_url = "ss://chacha20:password@proxy.example.com:8388"
102
+ # # proxy_url_env = "GOROUTER_PERSONAL_PROXY_URL"
103
+ #
104
+ # [providers.opencode-go.auth]
105
+ # mode = "bearer"
106
+ # header = "Authorization"
107
+ # scheme = "Bearer"
108
+ #
109
+ # # Provider-specific model context limits override upstream metadata.
110
+ # # Use the base model ID (not the provider-suffixed ID).
111
+ # [providers.opencode-go.model_overrides."MiniMax-M3"]
112
+ # max_context_tokens = 220000
113
+ # max_output_tokens = 16384
114
+ # enforce_context_limit = true
115
+
116
+ # ─── Popular Provider Defaults ─────────────────────────────────────────
117
+ # Uncomment providers you want to use. Each requires an API key from the
118
+ # provider's dashboard. Or use `eggpool connect` for interactive setup.
119
+
120
+ # DeepSeek — OpenAI compatible, very cost-effective
121
+ # Status: verified (official docs confirm OpenAI + Anthropic compatibility)
122
+ # [providers.deepseek]
123
+ # id = "deepseek"
124
+ # base_url = "https://api.deepseek.com"
125
+ # protocols = ["openai"]
126
+ #
127
+ # [[providers.deepseek.accounts]]
128
+ # name = "default"
129
+ # api_key = "sk-your-deepseek-key"
130
+ #
131
+ # [providers.deepseek.auth]
132
+ # mode = "bearer"
133
+
134
+ # OpenRouter — 400+ models through one API key
135
+ # Status: verified (official docs confirm OpenAI-compatible endpoint)
136
+ # [providers.openrouter]
137
+ # id = "openrouter"
138
+ # base_url = "https://openrouter.ai/api/v1"
139
+ # protocols = ["openai"]
140
+ #
141
+ # [[providers.openrouter.accounts]]
142
+ # name = "default"
143
+ # api_key = "sk-your-openrouter-key"
144
+ #
145
+ # [providers.openrouter.auth]
146
+ # mode = "bearer"
147
+ #
148
+ # # Optional attribution headers:
149
+ # # [[providers.openrouter.headers]]
150
+ # # name = "HTTP-Referer"
151
+ # # value = "https://example.local"
152
+ # # [[providers.openrouter.headers]]
153
+ # # name = "X-OpenRouter-Title"
154
+ # # value = "EggPool"
155
+
156
+ # Together AI — popular inference provider
157
+ # Status: verified (official docs confirm OpenAI-compatible endpoint)
158
+ # [providers.together]
159
+ # id = "together"
160
+ # base_url = "https://api.together.ai/v1"
161
+ # protocols = ["openai"]
162
+ #
163
+ # [[providers.together.accounts]]
164
+ # name = "default"
165
+ # api_key = "sk-your-together-key"
166
+ #
167
+ # [providers.together.auth]
168
+ # mode = "bearer"
169
+
170
+ # Fireworks AI — fast inference for open-source models
171
+ # Status: verified (official docs confirm Bearer auth + OpenAI-compatible endpoint)
172
+ # [providers.fireworks]
173
+ # id = "fireworks"
174
+ # base_url = "https://api.fireworks.ai/inference/v1"
175
+ # protocols = ["openai"]
176
+ #
177
+ # [[providers.fireworks.accounts]]
178
+ # name = "default"
179
+ # api_key = "sk-your-fireworks-key"
180
+ #
181
+ # [providers.fireworks.auth]
182
+ # mode = "bearer"
183
+
184
+ # OpenAI — direct OpenAI API
185
+ # Status: verified — reference OpenAI-compatible provider
186
+ # [providers.openai]
187
+ # id = "openai"
188
+ # base_url = "https://api.openai.com/v1"
189
+ # protocols = ["openai"]
190
+ #
191
+ # [[providers.openai.accounts]]
192
+ # name = "default"
193
+ # api_key = "sk-your-openai-key"
194
+ #
195
+ # [providers.openai.auth]
196
+ # mode = "bearer"
197
+ #
198
+ # # [providers.openai.verify]
199
+ # # probe_model = "gpt-5.5-mini"
200
+ # # probe_protocol = "openai"
201
+ # # require_models = true
202
+
203
+ # Anthropic — direct Claude API
204
+ # Status: verified — Anthropic Messages API with x-api-key auth and required version header
205
+ # [providers.anthropic]
206
+ # id = "anthropic"
207
+ # base_url = "https://api.anthropic.com/v1"
208
+ # protocols = ["anthropic"]
209
+ # anthropic_path = "/messages"
210
+ #
211
+ # [[providers.anthropic.accounts]]
212
+ # name = "default"
213
+ # api_key = "sk-your-anthropic-key"
214
+ #
215
+ # [providers.anthropic.auth]
216
+ # mode = "api_key"
217
+ # header = "x-api-key"
218
+ #
219
+ # [[providers.anthropic.headers]]
220
+ # name = "anthropic-version"
221
+ # value = "2023-06-01"
222
+ #
223
+ # # [providers.anthropic.verify]
224
+ # # probe_model = "claude-sonnet-4-5"
225
+ # # probe_protocol = "anthropic"
226
+ # # require_models = false
227
+
228
+ # Groq — low-latency OpenAI-compatible inference
229
+ # Status: verified — official docs use https://api.groq.com/openai/v1 with OpenAI clients
230
+ # [providers.groq]
231
+ # id = "groq"
232
+ # base_url = "https://api.groq.com/openai/v1"
233
+ # protocols = ["openai"]
234
+ #
235
+ # [[providers.groq.accounts]]
236
+ # name = "default"
237
+ # api_key = "sk-your-groq-key"
238
+ #
239
+ # [providers.groq.auth]
240
+ # mode = "bearer"
241
+ #
242
+ # # [providers.groq.verify]
243
+ # # probe_model = "openai/gpt-oss-20b"
244
+ # # probe_protocol = "openai"
245
+ # # require_models = true
246
+
247
+ # DeepInfra — OpenAI-compatible open-model inference
248
+ # Status: verified — official docs use https://api.deepinfra.com/v1/openai
249
+ # [providers.deepinfra]
250
+ # id = "deepinfra"
251
+ # base_url = "https://api.deepinfra.com/v1/openai"
252
+ # protocols = ["openai"]
253
+ #
254
+ # [[providers.deepinfra.accounts]]
255
+ # name = "default"
256
+ # api_key = "sk-your-deepinfra-key"
257
+ #
258
+ # [providers.deepinfra.auth]
259
+ # mode = "bearer"
260
+ #
261
+ # # [providers.deepinfra.verify]
262
+ # # probe_model = "deepseek-ai/DeepSeek-V3"
263
+ # # probe_protocol = "openai"
264
+ # # require_models = true
265
+
266
+ # Google Gemini — OpenAI-compatible Gemini API surface
267
+ # Status: verified — official docs use OpenAI clients with Gemini API keys
268
+ # [providers.gemini]
269
+ # id = "gemini"
270
+ # base_url = "https://generativelanguage.googleapis.com/v1beta/openai"
271
+ # protocols = ["openai"]
272
+ #
273
+ # [[providers.gemini.accounts]]
274
+ # name = "default"
275
+ # api_key = "sk-your-gemini-key"
276
+ #
277
+ # [providers.gemini.auth]
278
+ # mode = "bearer"
279
+ #
280
+ # # [providers.gemini.verify]
281
+ # # probe_model = "gemini-3.5-flash"
282
+ # # probe_protocol = "openai"
283
+ # # require_models = true
284
+
285
+ # xAI — direct Grok API
286
+ # Status: verified — API-key OpenAI client usage with https://api.x.ai/v1
287
+ # [providers.xai]
288
+ # id = "xai"
289
+ # base_url = "https://api.x.ai/v1"
290
+ # protocols = ["openai"]
291
+ #
292
+ # [[providers.xai.accounts]]
293
+ # name = "default"
294
+ # api_key = "sk-your-xai-key"
295
+ #
296
+ # [providers.xai.auth]
297
+ # mode = "bearer"
298
+ #
299
+ # # [providers.xai.verify]
300
+ # # probe_model = "grok-4.3"
301
+ # # probe_protocol = "openai"
302
+ # # require_models = true
303
+
304
+ # Mistral — direct Mistral API
305
+ # Status: verified — /v1/chat/completions with Bearer auth
306
+ # [providers.mistral]
307
+ # id = "mistral"
308
+ # base_url = "https://api.mistral.ai/v1"
309
+ # protocols = ["openai"]
310
+ #
311
+ # [[providers.mistral.accounts]]
312
+ # name = "default"
313
+ # api_key = "sk-your-mistral-key"
314
+ #
315
+ # [providers.mistral.auth]
316
+ # mode = "bearer"
317
+ #
318
+ # # [providers.mistral.verify]
319
+ # # probe_model = "mistral-small-latest"
320
+ # # probe_protocol = "openai"
321
+ # # require_models = true
322
+
323
+ # SiliconFlow — OpenAI-compatible Chinese model aggregator
324
+ # Status: verified — /v1/chat/completions with Bearer auth; verify model listing live
325
+ # [providers.siliconflow]
326
+ # id = "siliconflow"
327
+ # base_url = "https://api.siliconflow.cn/v1"
328
+ # protocols = ["openai"]
329
+ #
330
+ # [[providers.siliconflow.accounts]]
331
+ # name = "default"
332
+ # api_key = "sk-your-siliconflow-key"
333
+ #
334
+ # [providers.siliconflow.auth]
335
+ # mode = "bearer"
336
+ #
337
+ # # [providers.siliconflow.verify]
338
+ # # probe_model = "Pro/zai-org/GLM-4.7"
339
+ # # probe_protocol = "openai"
340
+ # # require_models = true
341
+
342
+ # Z.AI (ZhipuAI GLM) — OpenAI compatible
343
+ # Status: live-verification-required — confirm base_url and endpoints before production use
344
+ # [providers.zai]
345
+ # id = "zai"
346
+ # base_url = "https://api.z.ai/api/paas/v4"
347
+ # protocols = ["openai"]
348
+ #
349
+ # [[providers.zai.accounts]]
350
+ # name = "default"
351
+ # api_key = "sk-your-zai-key"
352
+ #
353
+ # # Live-verification-required: confirm base_url and endpoints before production use
354
+ # [providers.zai.auth]
355
+ # mode = "bearer"
356
+
357
+ # Alibaba Qwen — popular Chinese provider
358
+ # Status: verified (official docs confirm OpenAI-compatible endpoint; use regional base_url)
359
+ # [providers.alibaba]
360
+ # id = "alibaba"
361
+ # base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"
362
+ # protocols = ["openai"]
363
+ #
364
+ # [[providers.alibaba.accounts]]
365
+ # name = "default"
366
+ # api_key = "sk-your-alibaba-key"
367
+ #
368
+ # [providers.alibaba.auth]
369
+ # mode = "bearer"
370
+ #
371
+ # # Regional alternatives:
372
+ # # US Virginia: https://dashscope-us.aliyuncs.com/compatible-mode/v1
373
+ # # China Beijing: https://dashscope.aliyuncs.com/compatible-mode/v1
374
+ # # Hong Kong: https://cn-hongkong.dashscope.aliyuncs.com/compatible-mode/v1
375
+
376
+ # Novita AI — various open-source models
377
+ # Status: live-verification-required — confirm base_url and model-list endpoint
378
+ # [providers.novita]
379
+ # id = "novita"
380
+ # base_url = "https://api.novita.ai/openai"
381
+ # protocols = ["openai"]
382
+ #
383
+ # [[providers.novita.accounts]]
384
+ # name = "default"
385
+ # api_key = "sk-your-novita-key"
386
+ #
387
+ # # Live-verification-required: confirm base_url and endpoints before production use
388
+
389
+ # MiniMax International — OpenAI compatible
390
+ # Status: live-verification-required; use for keys from minimax.io
391
+ # [providers.minimax]
392
+ # id = "minimax"
393
+ # base_url = "https://api.minimax.io/v1"
394
+ # protocols = ["openai"]
395
+ # openai_path = "/chat/completions"
396
+ # models_path = "/models"
397
+ #
398
+ # [[providers.minimax.accounts]]
399
+ # name = "default"
400
+ # api_key = "sk-your-minimax-key"
401
+ #
402
+ # [providers.minimax.auth]
403
+ # mode = "bearer"
404
+ #
405
+ # # Optional live-verification probe — the verifier uses this when neither
406
+ # # --openai-model nor --anthropic-model is supplied.
407
+ # # [providers.minimax.verify]
408
+ # # probe_model = "MiniMax-M2.5"
409
+ # # probe_protocol = "openai"
410
+
411
+ # MiniMax China — OpenAI compatible
412
+ # Status: live-verification-required; use for keys from the China MiniMax console
413
+ # [providers.minimax-cn]
414
+ # id = "minimax-cn"
415
+ # base_url = "https://api.minimaxi.com/v1"
416
+ # protocols = ["openai"]
417
+ # openai_path = "/chat/completions"
418
+ # models_path = "/models"
419
+ #
420
+ # [[providers.minimax-cn.accounts]]
421
+ # name = "default"
422
+ # api_key = "sk-your-minimax-cn-key"
423
+ #
424
+ # [providers.minimax-cn.auth]
425
+ # mode = "bearer"
426
+
427
+ # GeneralCompute — OpenAI compatible (uses POST for model listing)
428
+ # Status: unverified — base_url path composition was corrected; run verifier before use
429
+ # [providers.generalcompute]
430
+ # id = "generalcompute"
431
+ # base_url = "https://api.generalcompute.com/v1"
432
+ # protocols = ["openai"]
433
+ # models_method = "POST"
434
+ # models_path = "/models/list"
435
+ #
436
+ # [[providers.generalcompute.accounts]]
437
+ # name = "default"
438
+ # api_key = "sk-your-generalcompute-key"
439
+ #
440
+ # [providers.generalcompute.auth]
441
+ # mode = "bearer"
442
+
443
+ # NeuralWatt — OpenAI compatible, energy-based pricing
444
+ # Status: live-verification-required — confirm base_url and model-list endpoint
445
+ # [providers.neuralwatt]
446
+ # id = "neuralwatt"
447
+ # base_url = "https://api.neuralwatt.com/v1"
448
+ # protocols = ["openai"]
449
+ #
450
+ # [[providers.neuralwatt.accounts]]
451
+ # name = "default"
452
+ # api_key = "sk-your-neuralwatt-key"
453
+ #
454
+ # # Live-verification-required: confirm base_url and endpoints before production use
455
+
456
+ # Ollama (local) — OpenAI compatible, no auth required
457
+ # Status: verified (well-known local service)
458
+ # [providers.ollama-local]
459
+ # id = "ollama-local"
460
+ # base_url = "http://localhost:11434/v1"
461
+ # protocols = ["openai"]
462
+ #
463
+ # [[providers.ollama-local.accounts]]
464
+ # name = "default"
465
+ #
466
+ # [providers.ollama-local.auth]
467
+ # mode = "none"
468
+
469
+ # Ollama (cloud) — OpenAI compatible via /v1 endpoints
470
+ # Status: unverified — confirm base_url and auth before production use
471
+ # [providers.ollama-cloud]
472
+ # id = "ollama-cloud"
473
+ # base_url = "https://ollama.com/v1"
474
+ # protocols = ["openai"]
475
+ #
476
+ # [[providers.ollama-cloud.accounts]]
477
+ # name = "default"
478
+ # api_key = "sk-your-ollama-key"
479
+ #
480
+ # [providers.ollama-cloud.auth]
481
+ # mode = "bearer"
482
+
483
+ # Cerebras — fast OpenAI-compatible inference
484
+ # Status: live-verification-required — confirm base_url and model listing
485
+ # [providers.cerebras]
486
+ # id = "cerebras"
487
+ # base_url = "https://api.cerebras.ai/v1"
488
+ # protocols = ["openai"]
489
+ #
490
+ # [[providers.cerebras.accounts]]
491
+ # name = "default"
492
+ # api_key = "sk-your-cerebras-key"
493
+
494
+ # SambaNova Cloud — OpenAI-compatible hosted open models
495
+ # Status: live-verification-required — confirm base_url and model listing
496
+ # [providers.sambanova]
497
+ # id = "sambanova"
498
+ # base_url = "https://api.sambanova.ai/v1"
499
+ # protocols = ["openai"]
500
+ #
501
+ # [[providers.sambanova.accounts]]
502
+ # name = "default"
503
+ # api_key = "sk-your-sambanova-key"
504
+
505
+ # Hyperbolic — OpenAI-compatible open-model inference
506
+ # Status: live-verification-required — confirm base_url and model listing
507
+ # [providers.hyperbolic]
508
+ # id = "hyperbolic"
509
+ # base_url = "https://api.hyperbolic.xyz/v1"
510
+ # protocols = ["openai"]
511
+ #
512
+ # [[providers.hyperbolic.accounts]]
513
+ # name = "default"
514
+ # api_key = "sk-your-hyperbolic-key"
515
+
516
+ # Featherless AI — OpenAI-compatible serverless open-model API
517
+ # Status: live-verification-required — confirm base_url and model listing
518
+ # [providers.featherless]
519
+ # id = "featherless"
520
+ # base_url = "https://api.featherless.ai/v1"
521
+ # protocols = ["openai"]
522
+ #
523
+ # [[providers.featherless.accounts]]
524
+ # name = "default"
525
+ # api_key = "sk-your-featherless-key"
526
+
527
+ # Moonshot AI / Kimi — direct OpenAI-compatible API
528
+ # Status: live-verification-required — confirm base_url and model listing
529
+ # [providers.moonshot]
530
+ # id = "moonshot"
531
+ # base_url = "https://api.moonshot.ai/v1"
532
+ # protocols = ["openai"]
533
+ #
534
+ # [[providers.moonshot.accounts]]
535
+ # name = "default"
536
+ # api_key = "sk-your-moonshot-key"
537
+
538
+ # Global model overrides apply to all providers. Provider-specific
539
+ # overrides take precedence per field. Token limit fields:
540
+ # max_context_tokens - total context window advertised to clients
541
+ # max_input_tokens - input ceiling (when different from context)
542
+ # max_output_tokens - effective generation ceiling
543
+ # enforce_context_limit - server-side rejection (default: true)
544
+ # [model_overrides."model-id"]
545
+ # max_context_tokens = 200000
546
+
547
+ [model_overrides."claude-opus-4"]
548
+ protocol = "anthropic"
549
+
550
+ [model_overrides."claude-sonnet-4"]
551
+ protocol = "anthropic"
@@ -0,0 +1 @@
1
+ """Account management and health tracking."""