Commit graph

2651 commits

Author SHA1 Message Date
Rohan Verma
d3da875658
Merge pull request #1599 from Thibaultjaigu/feat/requesty-provider
feat: add Requesty as a model provider
2026-07-13 13:03:20 -07:00
Rohan Verma
d1fa9306cb
Merge pull request #1597 from zzh-github/feature/openai-compatible-raw
Add raw OpenAI-compatible provider without /v1 normalization
2026-07-13 13:02:19 -07:00
Thibault Jaigu
2ff7ea4cb6 feat: add Requesty as a model provider
Add Requesty (https://requesty.ai), an OpenAI-compatible LLM router, as a
model provider by mirroring the existing OpenRouter integration.

Backend:
- app/services/requesty_model_normalizer.py: normalizes Requesty's /v1/models
  catalogue, mapping its flat capability booleans (supports_tool_calling/
  supports_vision/supports_image_generation) and context_window field onto the
  shared normalized shape (Requesty differs from OpenRouter's architecture +
  supported_parameters + context_length layout)
- provider_registry.py: Requesty ProviderSpec (OpenAI-compatible, base URL
  https://router.requesty.ai/v1, REQUESTY_API_KEY bearer auth)
- model_connection_service.py: key verification + live model discovery
- quality_score.py: Requesty score entry
- unit tests mirroring the OpenRouter normalizer coverage

Frontend:
- Requesty provider icon + registration, metadata entry, and base-url hint

Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
2026-07-13 09:42:30 +01:00
zzh
a172e9c162 Add raw OpenAI-compatible provider without /v1 normalization 2026-07-13 00:08:30 +08:00
Anish Sarkar
e38ca19b18 Merge remote-tracking branch 'upstream/dev' into feat/instagram-scraper 2026-07-11 04:31:11 +05:30
Anish Sarkar
819486ac46 docs(instagram): document PolarisMedia extraction and richer media fields 2026-07-11 03:44:38 +05:30
Anish Sarkar
d3c65a37b1 refactor(instagram): drop unused slug field and mark share links unsupported 2026-07-11 03:44:28 +05:30
Anish Sarkar
4bc3d43b56 refactor(instagram): remove unused share-link redirect resolver 2026-07-11 03:44:23 +05:30
Anish Sarkar
452fe30aa4 refactor(instagram): drop login-walled comment fields and note search_type aliasing 2026-07-11 03:44:15 +05:30
Anish Sarkar
cb4adab852 feat(instagram): extract PolarisMedia relay JSON with carousel, tags, and location 2026-07-11 03:44:10 +05:30
Anish Sarkar
b1fe739308 docs(instagram): update platform scraper README 2026-07-11 03:25:36 +05:30
Anish Sarkar
c001f4b16e feat(subagent): update Instagram subagent system prompt 2026-07-11 03:25:25 +05:30
Anish Sarkar
27d22a9a2a refactor(instagram): drop mentions from scrape capability 2026-07-11 03:25:20 +05:30
Anish Sarkar
5cac6612c3 refactor(instagram): update platform schemas and scraper for tagged media 2026-07-11 03:25:17 +05:30
Anish Sarkar
457be1871c feat(instagram): improve parsing of Instagram media IDs and mentions
- Enhanced the regular expression for mentions to prevent trailing punctuation from being included in handles.
- Added support for extracting media IDs from deep-link meta tags in anonymous posts.
- Updated unit tests to validate the new media ID extraction and ensure proper handling of mentions.
2026-07-11 03:06:04 +05:30
Anish Sarkar
d41ccb7edd feat(instagram): enhance Open Graph parsing for anonymous posts
- Added support for extracting likes, comments, username, timestamp, and caption from Open Graph meta tags.
- Implemented fallback mechanisms to ensure graceful degradation when expected data is missing.
- Updated unit tests to validate new parsing logic and ensure robustness against unrecognized formats.
2026-07-11 02:56:29 +05:30
Anish Sarkar
9e9dd8a124 feat(subagent): update Instagram subagent prompts and tools 2026-07-11 02:21:02 +05:30
Anish Sarkar
36bb4a1bea docs(instagram): update platform scraper README 2026-07-11 02:20:54 +05:30
Anish Sarkar
4813dc96e3 refactor(instagram): streamline scraper, fetch, and parsing pipeline 2026-07-11 02:20:51 +05:30
Anish Sarkar
de1990f9f6 refactor(instagram): simplify scrape and details capability schemas 2026-07-11 02:20:46 +05:30
Anish Sarkar
8afa4c6fc6 refactor(instagram): remove unused comments capability 2026-07-11 02:20:39 +05:30
CREDO23
1911b78379 fix(tiktok-agent): drop keyword search from the routing description's video sources 2026-07-10 17:40:04 +02:00
CREDO23
cd82f861de fix(tiktok-agent): stop steering the subagent to keyword search for videos
The playbook listed search_queries as a video source in three places, then contradicted itself. Replace with action-oriented guidance: videos via hashtags/URLs, accounts via user_search. Drop 'login-walled' (the agent has no login path).
2026-07-10 17:40:04 +02:00
CREDO23
f74a73efdb docs(tiktok): trim fetch_item_list retry docstring to intent 2026-07-10 17:28:47 +02:00
CREDO23
01bc3f8de3 docs(config): trim narration from xvfb + listing-retry comments 2026-07-10 17:28:47 +02:00
CREDO23
c8fcf87685 fix(tiktok): retry empty item_list captures on a fresh exit IP
The profile feed is withheld from flagged IPs and the proxy rotates per request, so re-fetching an empty capture (up to TIKTOK_LISTING_MAX_ATTEMPTS) turns a bad first draw into a hit instead of an ErrorItem.
2026-07-10 17:25:48 +02:00
CREDO23
15fb50c83e feat(tiktok): add TIKTOK_LISTING_MAX_ATTEMPTS knob
Bounds the browser-listing retry-on-empty; default 3, set 1 for a static IP.
2026-07-10 17:25:48 +02:00
CREDO23
6400dc5f04 fix(tiktok): gate headful profile feed on CRAWL_HEADED_XVFB_ENABLED
fetch_item_list goes headful only when the flag promises a display; otherwise it stays headless so the browser launch never fails and the empty feed degrades to an ErrorItem. Verified under xvfb-run: real videos returned on a clean proxy IP, graceful degrade on a flagged one.
2026-07-10 17:17:45 +02:00
CREDO23
6784503414 feat(crawl): add CRAWL_HEADED_XVFB_ENABLED flag
Single switch promising an Xvfb display so the stealth browser can run headful (TikTok's profile feed is empty to headless Chromium). Defaults FALSE.
2026-07-10 17:17:27 +02:00
CREDO23
c679f2a3ef fix(tiktok): fetch profile video lists headful + dismiss login modal
The profile feed (/api/post/item_list) returns an empty 200 to headless
sessions but serves data headful on the same proxy IP. Run fetch_item_list
headful and dismiss the login modal that blocks mid-scroll.
2026-07-10 16:45:45 +02:00
CREDO23
867e940911 Merge upstream/dev into feature/tiktok-scraper
Sync with the advanced dev tip so the PR compares against current dev
(drops already-merged commits from the diff). No history rewritten.
2026-07-09 20:15:20 +02:00
CREDO23
6b15d610d9 feat(tiktok): surface comments, user_search, trending across all product surfaces
Brings the three newer verbs to parity with tiktok.scrape everywhere it was
wired: MCP tools (+ selfcheck manifest), the chat subagent prompt/description,
the playground catalog, the native docs page, and the SEO marketing page. Also
adds live e2e stages for comments, user search, and trending. Docs/FAQ now
state the real contract: profile metadata is reliable while its video list can
be withheld, and keyword video search is walled (use user search for accounts).
2026-07-09 19:09:00 +02:00
CREDO23
67b5472b9f feat(tiktok): add tiktok.trending verb for the Explore feed
The Explore feed (/api/explore/item_list) is a global trending-video feed
served to anonymous sessions, and it returns the same itemStruct shape as the
other listings — so the verb reuses parse_video, the listing flow, the
TikTokVideoItem output, and the per-video billing meter wholesale. Adds a
browser-capture marker + fetch_trending, a synthetic-target orchestrator entry,
and the tiktok.trending capability, surfaced on the chat subagent.
2026-07-09 18:52:56 +02:00
CREDO23
7723b5b8b6 feat(tiktok): add tiktok.comments verb for public comment scraping
Comments load over a signed /api/comment/list XHR that TikTok serves to
anonymous sessions once the comments panel is opened (unlike profile-video and
general-search feeds), so this is a reliable verb. Given video URLs it returns
CommentItems (text, author, likes, reply counts; replies carry repliesToId),
deduped per video, capped, and degraded to an ErrorItem for empty/withheld
videos or a bad_url ErrorItem for non-video inputs.

Generalizes the browser capture over a pluggable interaction step so the
comments flow (open panel, scroll the panel to paginate) reuses the same
warm+capture scaffolding as listing/user-search. Billed per comment on a new
TIKTOK_COMMENT meter (TIKTOK_MICROS_PER_COMMENT, matching the per-comment
market), surfaced on the chat subagent alongside tiktok.scrape/user_search.
2026-07-09 18:35:26 +02:00
CREDO23
192b6dc31a feat(tiktok): add tiktok.user_search verb for account discovery
Video/general search is login-walled for anonymous sessions, but the Users
tab (/api/search/user) returns public account records without a redirect, so
this exposes the one reliably-unblocked search path. A keyword yields
TikTokProfileItems (name, followers, bio, verification), deduped per query,
capped, and degraded to an ErrorItem when a query is empty/withheld.

Reuses the browser capture (generalized over XHR markers + extractor) and the
shared profile item shape. Billed per account on a new TIKTOK_USER meter
(TIKTOK_MICROS_PER_USER), surfaced on the chat subagent alongside tiktok.scrape.
2026-07-09 18:00:40 +02:00
CREDO23
6652efd035 feat(tiktok): return profile metadata even when video listing is gated
A profile's account data (name, followers, bio, verification) lives in the
page's rehydration blob and loads over plain HTTP without a signed request,
so emit it first and always. The video listing needs a signed item_list XHR
that TikTok withholds from anonymous sessions, so it stays best-effort and
degrades to an ErrorItem. A blocked profile now yields its metadata instead
of only an ErrorItem.
2026-07-09 17:48:19 +02:00
Anish Sarkar
82f1d0b4e5 refactor(instagram): improve anonymous scraping logic and error messaging
Enhanced the Instagram scraper to clarify the requirements for accessing user profiles and hashtags. Updated the error message for blocked access to provide detailed guidance on necessary credentials. Introduced a regex for validating Instagram usernames and refined the discovery function to handle profile queries directly, improving user experience and error handling in anonymous mode.
2026-07-09 20:23:09 +05:30
Anish Sarkar
f66ab73044 refactor(instagram): improve handling of login-gated endpoints in fetch logic
Enhanced the fetch_json function to immediately raise InstagramAccessBlockedError for login-gated endpoints, preventing unnecessary IP rotations. Introduced a new constant for authentication-walled paths to streamline the detection of access blocks, improving the scraper's efficiency in handling Instagram's restrictions.
2026-07-09 20:22:46 +05:30
Anish Sarkar
a0b388a5c5 refactor(instagram): enhance batch processing for access block handling
Updated the fan_out function to allow partial results when encountering blocked targets. Instead of aborting the entire batch on a hard login wall, the function now tracks blocked statuses and raises InstagramAccessBlockedError only if all targets are blocked. This change improves the scraper's resilience and efficiency in handling Instagram's access restrictions.
2026-07-09 19:56:41 +05:30
Anish Sarkar
be26f00d20 refactor(instagram): enhance fetch logic for login wall detection
Updated the fetch_json function to raise InstagramAccessBlockedError immediately upon detecting a login redirect (302 -> /accounts/login/). This change prevents unnecessary IP rotations when encountering endpoint-level access blocks, improving the efficiency of the scraper's handling of Instagram's login wall.
2026-07-09 19:56:29 +05:30
Anish Sarkar
e8f8eeab27 fix(instagram): improve error handling for Instagram access blocks in scraper
Updated the fan_out function to handle InstagramAccessBlockedError more gracefully. Instead of raising the error directly, it now puts the error into the results queue to prevent deadlocks. This change ensures that the consumer can handle access block scenarios without interrupting the processing of other jobs.
2026-07-09 19:08:18 +05:30
Anish Sarkar
d800ca33a5 feat(instagram): handle soft login wall in fetch logic
Added detection for Instagram's soft login wall, which returns a 200 status with login HTML. Implemented a new function to identify login redirects and adjusted the fetch logic to treat these cases similarly to 401/403 responses.
2026-07-09 18:29:17 +05:30
Anish Sarkar
98eab8c4b5 feat(chat): add Instagram builtin subagent 2026-07-09 16:02:05 +05:30
Anish Sarkar
929efe8152 feat(instagram): register instagram.* capability namespace 2026-07-09 16:01:49 +05:30
Anish Sarkar
7ea474be93 feat(instagram): add details capability verb 2026-07-09 16:01:38 +05:30
Anish Sarkar
38a26b1ccf feat(instagram): add comments capability verb 2026-07-09 14:58:58 +05:30
Anish Sarkar
ff55537bce feat(instagram): add scrape capability verb 2026-07-09 14:58:54 +05:30
Anish Sarkar
eccc142974 docs(instagram): add platform scraper README 2026-07-09 14:58:47 +05:30
Anish Sarkar
6270250f74 feat(instagram): add fan-out orchestrator with deterministic early-stop cleanup 2026-07-09 14:58:38 +05:30
Anish Sarkar
b1eff478fd feat(instagram): add proxy-aware fetch with warm-up and rotate-on-block 2026-07-09 14:58:32 +05:30