Files
frigate/web
Blake BlackshearGitHubfrigate-agents[bot] <356735177+frigate-agents[bot]@users.noreply.github.com>Claude Opus 5.5
2b4b1fdb8e Plus rate limit handling (#25075)
* Raise a rate limit error when Frigate+ returns 429

The shared session's urllib3 Retry honored Retry-After by default, so a
429 on a GET or PUT blocked the calling thread for up to ten times the
requested wait (and fell back to exponential backoff for Retry-After: 0)
before failing with a generic error.

Stop honoring Retry-After in urllib3 and raise PlusRateLimitError with
the parsed wait instead. Retry-After is parsed as either delay-seconds or
an HTTP date per RFC 9110. While the wait is in effect, further requests
are refused locally rather than sent to Frigate+ again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Don't save a failed Frigate+ model download as the model

The model download never checked the response status, so an error body
(a 429 from the download host, for example) was written to the model
cache. Only the file's existence is checked on later starts, so the
error page was loaded as the model from then on.

Raise a config error instead of writing the file, and explain a Frigate+
rate limit at startup with how long to wait when it is known.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Report a rate limited Frigate+ key validation

A 429 while validating the API key was reported as "unreachable". Add a
rate_limited status that records the Retry-After wait, skip asking the
server again while that wait is in effect, and include the remaining
seconds in the /plus/validate response.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Return 429 from the API when Frigate+ is rate limiting

Submitting an event, frame, or false positive reported a rate limit as a
generic 400 upload error, and listing models failed with a 500. Return a
429 with the wait in retry_after and the Retry-After header so the UI can
tell the user how long to wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Show Frigate+ rate limits in the UI

Tell the user Frigate+ is rate limiting requests, and how long to wait
when the server said, instead of a generic failure:

- submitting a tracked object or false positive (explore and the review
  dialog), a frame from the player, or a frame from tracking details
- validating the API key in Frigate+ settings
- the Frigate+ model list in detection model settings and the setup
  wizard

The frame upload from the player also showed failures with a success
toast, and since axios rejects on error statuses it never reached that
branch at all, so failed uploads showed nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let a failed Frigate+ annotation be retried

send_to_plus saved plus_id as soon as the image uploaded, so when the
annotation then failed (a rate limit, for example) every retry was
refused with "Already submitted to plus" and the image stayed without
its annotation.

Keep the uploaded image id in the event's data until the annotation
succeeds, and only then set plus_id. A retry reuses that image instead
of uploading it again, and since plus_id is still unset the UI already
offers the retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the longest Frigate+ wait when replies overlap

Requests to Frigate+ run on several threads. When two were refused at
once, a reply with a shorter Retry-After that was handled last replaced
the longer wait, so requests were sent again before Frigate+ allowed it.

Only move the deadline later, under a lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Include days in Frigate+ rate limit waits

formatSecondsToDuration only formats hours, minutes and seconds, so a
wait of a day or more lost its days: 90000 seconds read as "1 hour".
Format the wait from whole days down instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the Frigate+ rate limit lock out of the client

The config holds the Frigate+ client and is pickled to start worker
processes from the forkserver. The lock added to PlusApi can't be
pickled, so worker startup failed with "cannot pickle '_thread.lock'
object", with or without a Frigate+ key.

Use a module level lock instead. Rate limit state is per process, so one
lock per process is all that's needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: frigate-agents[bot] <356735177+frigate-agents[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:12:34 -07:00
..
2024-06-19 08:11:51 -06:00
2026-11-24 07:12:34 -07:00
2026-10-10 15:01:33 -05:00
2026-11-24 07:12:34 -07:00
2026-11-24 07:12:34 -07:00
2026-06-16 08:56:52 -05:00
2024-06-19 08:11:51 -06:00
2026-04-22 09:19:30 -06:00
2026-10-10 15:01:33 -05:00
2024-01-31 12:56:11 +00:00

This is the Frigate frontend which connects to and provides a User Interface to the Python backend.

Web Development

Installing Web Dependencies Via NPM

Within /web, run:

npm install

Running development frontend

Within /web, run:

PROXY_HOST=<ip_address:port> npm run dev

The Proxy Host can point to your existing Frigate instance. Otherwise defaults to localhost:5000 if running Frigate on the same machine.

Extensions

Install these IDE extensions for an improved development experience:

  • eslint