Repository navigation
api: c0mpute as a swarm provider (house key when the user has none) - #178
Merged
Merged
Conversation
/api/swarm: provider c0mpute runs on Infernet's OpenAI-compatible endpoint (infernetprotocol.com/v1; api.c0mpute.com never resolved). A user's own key keeps priority; with no key, provider c0mpute runs on the house C0MPUTE_API_KEY, capped per user per day. A request naming neither goes to c0mpute only with SWARM_DEFAULT_PROVIDER=c0mpute (private messages to peer nodes is an explicit choice). c0mpute runs answer 200 at once with keepalive spaces then the JSON, so minutes-long calls survive the 300 s proxy. c0mpute also added to /api/models, the web settings, the sidebar and model-providers provider tables (own key). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
ThreatCrush Security Scan51 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 28 | LOW: 21
…and 1 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fleet AI rollout: c0mpute next to BYO user keys (ai-providers ROLLOUT.md).
services/api
/api/swarm:c0mputenow points at Infernet's OpenAI-compatible endpointhttps://infernetprotocol.com/v1(the oldapi.c0mpute.comdoes not resolve), default modelhuihui_ai/qwen3.5-abliterated:9b, 15 min client timeout.resolveSwarmProvider: a user's own key always wins (any provider, c0mpute included). No key +provider: "c0mpute"runs on the houseC0MPUTE_API_KEY(never sent to a caller-supplied baseUrl), capped atSWARM_C0MPUTE_DAILY(30) runs per user per day.SWARM_DEFAULT_PROVIDER=c0mpute: swarm messages are the user's own, and routing them to peer nodes silently is flagged for a decision rather than turned on here. The 400 now saysprovider: "c0mpute"works without a key.{"error"}); leading whitespace is valid JSON. Keeps minutes-long peer calls inside nginx's 300 s read timeout and Bun's idle timer. Response carriesprovider: "c0mpute"./api/modelslists c0mpute models.tools, so on c0mpute the deep agent answers in one shot rather than using its tools; the rubric judge is plain-text JSON and works.Clients (own key only, explicit choice): c0mpute added to web settings, the AI sidebar provider table, and
@tronbrowser/model-providers(catalog, endpoint,C0MPUTE_API_KEYenv var).Tests:
services/api/src/swarm.test.ts(8) for key priority, house key, opt-in default, refusals, daily cap, keepalive JSON; model-providers count updated. api typecheck + lint clean (warnings only, pre-existing).🤖 Generated with Claude Code