Conversation
Adds Synthetic (synthetic.new) as an API-key provider modeled on the
existing managed-key accounts. Quota fetches hit GET /v2/quotas and
normalize the regenerating five-hour request window, the weekly credit
window with a remaining-credits display, the hourly search window, and
a subscription fallback when the rolling window is absent.
Synthetic quotas refill a partial amount on a fixed tick schedule
instead of resetting wholesale, so its window rows use refill wording
("Refills in 38m") and the meter tooltip schedules the full-regeneration
estimate on the tick grid: the ticks needed to drain the used quota,
anchored on the next tick, counting down between ticks. The linear pace
marker is omitted for these windows since it assumes a full reset.
Includes multi-account management, optional OpenCode key prefill, demo
state, provider icons, and English/Polish localization. Bumps the
config schema version to 700 with defaults for existing installations.
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.
What
Adds Synthetic — a flat subscription to open-source LLMs (Kimi-K3, GLM-5.2, Qwen3.6, …) behind OpenAI/Anthropic-compatible APIs — as a twelfth provider, following the existing API-key account pattern (Kimi/Minimax/Z.AI/OpenCode Go): managed API-key accounts, reauthentication, optional OpenCode
auth.jsonprefill (provider idsynthetic), and no host Active badge.Usage source
GET https://api.synthetic.new/v2/quotas(free call, does not count against limits; documented at dev.synthetic.new). The response exposes:rollingFiveHourLimit(remaining/max,nextTickAt) → the 5-hour request window;subscriptionserves as a fallback shapeweeklyTokenLimit(percentRemaining, $maxCredits/remainingCredits,nextRegenAt) → the weekly credit window plus a remaining-credits displaysearch.hourly→ a 1-hour search window;freeToolCallsis skipped when its limit is 0Refill semantics
Synthetic quotas regenerate a partial amount on a fixed tick schedule (5h window: +5% every 15 min; weekly credits: +2% every 202 min) rather than resetting wholesale. Two display adaptations:
Notes for review
#[serde(default)]so existing installations migrate cleanly.RegenerationTickto the model andregeneration_tick_for/refill_meter/full_regeneration_labelin the display layer; tick parameters live in the provider module.src/config.rs/src/app/tests.rsin different regions and should rebase trivially if that merges first.All 792 tests pass,
cargo fmtandjust checkare clean.