4756 Commits

Author SHA1 Message Date
devin-ai-integration[bot]
449a5d612c
Add debug logging for 402 credit check failures (#2638)
* Add debug logging for 402 credit check failures

- Add comprehensive logging when credit check fails in supaCheckTeamCredits
- Log all ACUC fields and computed values to help diagnose incorrect credit calculations
- Add minimumSource tracking in checkCreditsMiddleware to debug how minimum credits is computed
- Remove req.body from error logs to avoid leaking sensitive user data

Co-Authored-By: Micah Stairs <micah.stairs@gmail.com>

* Revert changes in shared.ts per user request

Co-Authored-By: Micah Stairs <micah.stairs@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Micah Stairs <micah.stairs@gmail.com>
2026-01-04 22:29:59 -05:00
tom
71fa1d6bdb
fix(api): validate team ownership when appending to an existing crawl (#2637) 2026-01-04 23:06:39 +00:00
Himanshu Gupta
090061f84f
Revert "fix: add Number() coercion to prevent string concatenation in credit …" (#2636)
This reverts commit 01609f25c84f51ddd815b0f3dbc2e2d6d1ecd989.
2026-01-04 19:21:33 +05:30
devin-ai-integration[bot]
01609f25c8
fix: add Number() coercion to prevent string concatenation in credit calculations (#2635)
* fix: add Number() coercion to prevent string concatenation in credit calculations

Postgres numeric columns may be returned as strings by Supabase RPC calls.
When arithmetic operations are performed on these string values, JavaScript
does string concatenation instead of numeric addition, causing false
'Insufficient credits' errors even when users have remaining credits.

This fix adds Number() coercion to all ACUC numeric fields before arithmetic:
- credit_billing.ts: adjusted_credits_used, total_credits_sum, price_credits, remaining_credits
- batch_billing.ts: credits_used, adjusted_credits_used, remaining_credits in cache updates
- shared.ts: remaining_credits, price_credits in authMiddleware

Co-Authored-By: himanshu@sideguide.dev <himanshu@sideguide.dev>

* fix: add Number() coercion to auto_charge.ts to prevent string concatenation

Fixes the same string concatenation bug in auto_charge.ts:
- _autoChargeScale: lines 358-364 (remainingCredits calculation after auto-recharge)
- _autoChargeSelfServe: lines 615-620 (remainingCredits calculation after auto-recharge)

When chunk.remaining_credits is a string (e.g., '29986'), adding AUTO_RECHARGE_CREDITS
would produce '299861000' instead of 30986.

Co-Authored-By: himanshu@sideguide.dev <himanshu@sideguide.dev>

* fix: add Number() coercion to price.credits in auto_charge.ts

price.credits also comes from Supabase/Postgres and could be returned as a string,
causing the same string concatenation bug.

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: himanshu@sideguide.dev <himanshu@sideguide.dev>
Co-authored-by: Himanshu Gupta <thinktank.himanshu@gmail.com>
2026-01-04 14:32:20 +05:30
Abimael Martell
a3775fe206
Update firecrawl/html-to-markdown (#2634) 2026-01-03 14:11:04 -08:00
tom
9dfceacac0
feat: webhooks for agent (#2628)
* feat(api): add webhook support to agent request schema

* feat(api): add more events by default

* refactor(api): DRY webhooks
2026-01-03 15:29:36 +00:00
Gergő Móricz
ca27d860ed
fix(nuq): zombie pg clients (#2633) 2026-01-03 15:14:45 +01:00
Gergő Móricz
4368f87c42 fix(ci): create simple images with build-push-action instead of manifest lists 2026-01-03 11:30:49 +01:00
Gergő Móricz
e25110b9b4 fix(ci): use arm64 workers to build arm64 images quickly 2026-01-03 11:27:31 +01:00
Eugene Myasyshchev
6c295b8fcf
Multi-arch images for playwright and api with linux/arm64 support (#2555)
* Enable multiplatform build for playwhright service.

* Temporary branch.

* Temp change to trigger CI.

* Remove temp stuff.

* Adding multiarch build for the api.

* Proper branch.

* Trigger CI.

* Restore stuff.

* Newline.
2026-01-03 11:20:19 +01:00
Abimael Martell
1c64e68fd5
Increase Markdown Service Body Limit (#2629)
* Add error details to Go Markdown Service

* add error to service

* Increase Markdown Service Body Limit
2026-01-02 12:25:17 -08:00
Abimael Martell
49ba2226b9
Add Request ID to Markdown Service Logger (#2630) 2026-01-02 12:24:32 -08:00
Abimael Martell
b172bbe4ca
Add error details to Go Markdown Service (#2624)
* Add error details to Go Markdown Service

* add error to service
2025-12-31 12:39:52 -08:00
Abimael Martell
08445f9d64
Fix NPM Audit (#2623) 2025-12-30 17:45:06 -08:00
Abimael Martell
a5e3efc77a
Add request_id to Markdown Logs (#2621)
* Add request_id to Markdown Logs

* remove unused param
2025-12-30 13:17:35 -08:00
Abimael Martell
28e64910d8
Update html-to-markdown version (#2620) 2025-12-30 12:25:05 -08:00
tom
4a6ed31acb
feat(api): include jobId in search response metadata (#2618) 2025-12-30 18:33:24 +00:00
Abimael Martell
e712b9795c
Ignore Cancelled Jobs on Sentry (#2614)
* Ignore Cancelled Jobs on Sentry

* no need for this
2025-12-29 16:15:47 -08:00
Abimael Martell
dc73d1da93
Don't log EngineError to Sentry (#2613) 2025-12-29 14:54:59 -08:00
tom
870b4b1af9
feat(api): extract background images (#2611) 2025-12-29 19:14:48 +00:00
Abimael Martell
05c76d669a
Allow formats on agent schema (#2603) 2025-12-29 10:24:17 -03:00
Abimael Martell
c61a3f03e8
js-sdk: Retry polling after errors, add jobId to error exception (#2608)
* js-sdk: Retry polling after errors, add jobId to error exception

* better type

* dry

* version bump
2025-12-26 14:23:47 -08:00
Trevor Sullivan
a62739c78a
Fixes #2583 add RabbitMQ health check and update API container dependencies (#2605)
Fixes an issue with the API container on startup, due to its dependency on the RabbitMQ container.

https://github.com/firecrawl/firecrawl/issues/2583
2025-12-26 11:50:45 -08:00
Micah Stairs
ebca2553fd
Throw error when v3-beta is passed into /extract (#2601)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-12-24 10:45:03 -04:00
devin-ai-integration[bot]
130baf5c4a
Add redis.sadd("billed_teams", team_id) to clearACUCTeam for centralized tracking (#2602)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Micah Stairs <micah.stairs@gmail.com>
2025-12-24 10:40:23 -04:00
delong3
acc2a5d3a2
fix(api): index metrics backwards compat (#2598) 2025-12-23 09:35:36 +11:00
tom
eba72e75f5
feat(api): custom header support for /map (#2593) 2025-12-22 14:48:50 +00:00
Gergő Móricz
b95e489867
fix(api/search): saner billing logic (#2585)
* fix(api/search): saner billing logic

- search.credits_cost will only include the credits used by the search itself
- scrape.credits_cost will now include the credits used by the scrapes
- enterprise option will be stored even with zdr

* fix logic in search v1
2025-12-19 20:45:03 +01:00
devin-ai-integration[bot]
4cbe71002c
feat: add bypassCreditChecks team flag for infinite graceful credit checks (#2578)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Micah Stairs <micah.stairs@gmail.com>
2025-12-19 12:37:04 -05:00
Gergő Móricz
b11dc3100d fix extract-worker liveness probe 2025-12-19 16:13:33 +01:00
tom
436af5428b
chore(api): re-route fire-1 (#2584) 2025-12-19 14:55:45 +00:00
Gergő Móricz
d5ffdb1773 fix(api/agent): fix out of credits when using daily free requests 2025-12-19 15:03:26 +01:00
Gergő Móricz
11f51eda2f
fix(extract): rabbitmq + poison pill handling (#2581)
* fix(extract): rabbitmq + poison pill handling

* rabbitmq required on mainline

* fix graceful shutdown

* harness and status fixes
2025-12-19 12:20:10 +01:00
Abimael Martell
e4eb79f16c
python-sdk: Update Agent Client (#2579)
* python-sdk: Update Agent Client

* bump version

* cr comment

* validate schema type
2025-12-18 21:38:57 -08:00
Gergő Móricz
2e07269bfa fix flag 2025-12-18 17:25:14 +01:00
Gergő Móricz
b619390aa6 feat(api): a/ccm 2025-12-18 12:24:06 +01:00
Gergő Móricz
e1e9c38a7d feat(api): a/sctu 2025-12-17 22:21:28 +01:00
amplitudes
c5cb971981
fix(api): make a/usage free w no db 2025-12-17 20:55:12 +00:00
amplitudes
fa4bd93f15
fix: supa a/usage 2025-12-17 20:27:58 +00:00
Gergő Móricz
6a2425b776 feat(api): a/mc 2025-12-17 20:24:11 +01:00
Abimael Martell
f138e95172
Update html-to-markdown module (#2573) 2025-12-17 18:47:06 +00:00
Gergő Móricz
e6e24bab92 feat(api): a/d 2025-12-17 18:38:03 +01:00
Gergő Móricz
63b2c72852
feat(api): ab/bsrch (#2572) 2025-12-17 17:18:22 +01:00
Gergő Móricz
a09d7fcbc0 fix(api): 2025-12-17 16:52:06 +01:00
Gergő Móricz
b8c1ad84c6
feat(api): ab/bs (#2571) 2025-12-17 16:30:32 +01:00
Gergő Móricz
30a30127c3 feat(api): ab/a 2025-12-17 15:43:10 +01:00
Gergő Móricz
47e1379bac
feat(api): ab/b (#2570) 2025-12-17 15:07:00 +01:00
Gergő Móricz
419427f93e feat(api): ab 2025-12-17 14:55:12 +01:00
Gergő Móricz
bfc3fd5496 feat(api): ab/a 2025-12-17 14:30:32 +01:00
Abimael Martell
d2c5cab20a
Fix Deps Audit (#2569) 2025-12-16 19:05:18 -08:00