Skip to content

v0.138.0

Choose a tag to compare

@nstfkc nstfkc released this 13 Oct 12:45
· 363 commits to main since this release

AI provider errors (#938, #941)

  • An image model's safety refusal (moderation_blocked, "rejected by the safety system", safety_violations) is now content_filtered (not retryable) instead of provider_error.
  • An Azure rate-limit 429 (RateLimitReached, or a message whose only "quota" is the aka.ms/oai/quotaincrease link) is now retried instead of failing as a spent quota. insufficient_quota or "quota" in the message text is still not retried.
  • New optional retryAfter (ms) on AgentError, ProviderHttpError and ImageRequestError, from the Retry-After header or "retry after N seconds" in the message. Retries wait that long (capped at the existing 20 s maximum).

Theme (#937, #942)

  • The injected theme script no longer strips light/dark from <html> when there is no stored choice and no default; it only removes the opposite class of the theme it applies.
  • setTheme also writes a theme cookie (theme by default, 1 year, SameSite=Lax); the server reads it into __GEMI_DATA__.theme so SSR and the client agree.
  • useTheme() returns { theme, resolved, setTheme }; resolved is null while "system" is unknown.
  • New view.theme: { default?, cookie? } | false config and a "no-theme" middleware directive to drop the script for a router/route.
  • Theme and ResolvedTheme are exported from gemi/client. Existing localStorage choices are still honoured.

Upgrade notes

  • Apps catching provider_error for image refusals should catch content_filtered.
  • Apps that relied on the theme script clearing dark with no default should set view.theme.default.