Skip to content

feat(requesty): add automated model catalog sync#2805

Open
Thibaultjaigu wants to merge 1 commit into
anomalyco:devfrom
Thibaultjaigu:add-requesty-model-sync
Open

feat(requesty): add automated model catalog sync#2805
Thibaultjaigu wants to merge 1 commit into
anomalyco:devfrom
Thibaultjaigu:add-requesty-model-sync

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

What

Adds a Requesty sync provider so the Requesty catalog stays up to date through the existing per-provider sync automation, mirroring the OpenRouter aggregator. Today Requesty's entries are hand-maintained (38 models); this lets bun models:sync requesty (and the scheduled automation) keep it current.

How

Requesty (https://requesty.ai) is an OpenAI-compatible LLM gateway. Its /v1/models endpoint reports per-model input_price/output_price/cached_price (USD per token), context_window, max_output_tokens, and capability flags.

  • New packages/core/src/sync/providers/requesty.ts — a SyncProvider that fetches https://router.requesty.ai/v1/models, translates pricing to USD-per-million, and reuses the OpenRouter aggregator's resolveCanonicalBaseModel/factorBaseModel (Requesty uses the same provider/model id convention).
  • Registered in packages/core/src/sync/index.ts (providers registry, type, and the aggregators group).

Curation / safety choices:

  • parseModels only admits models that resolve to an existing canonical models.dev base model, so entries stay factored via base_model and the catalog isn't flooded with every proxied sub-provider variant (Requesty serves 500+ ids, many re-proxied). It also drops Requesty routing-policy aliases (policy/*).
  • deleteMissing: false and sameModel: () => true make the sync additive: it creates newly-served models but never overwrites or removes the hand-curated entries (Requesty's API doesn't carry every field a curated TOML may have, e.g. cache_write tiers or pdf modality).

Testing

  • bun models:sync requesty runs against the live API and adds 43 currently-served models (alibaba/anthropic/deepseek/google/nvidia/openai/xai/xiaomi/zai), all factored via base_model. Re-running is idempotent (0 changes).
  • bun validate passes on the generated catalog.
  • bun test — the sync tests pass; the one failing test (open-weight model metadata includes weights links) also fails on a clean dev checkout, i.e. it's pre-existing and unrelated to this change.

I work at Requesty. This mirrors the existing OpenRouter aggregator sync as closely as possible. Happy to adjust the curation rules (e.g. which model families to include) or close it if it's not a fit.

Adds a Requesty sync provider so its catalog stays up to date via the
existing per-provider automation, mirroring the OpenRouter aggregator.

Requesty (https://requesty.ai) is an OpenAI-compatible LLM gateway whose
/v1/models endpoint reports per-model pricing, context window, max output
tokens, and capability flags. The sync module reuses the OpenRouter
aggregator's canonical base-model resolver and only admits models that map
onto an existing models.dev base model, so entries stay factored via
base_model and the catalog stays curated rather than mirroring every
proxied sub-provider variant. It is additive (sameModel + deleteMissing:
false) so hand-curated entries are never overwritten or removed.

Registers requesty in the sync provider registry and the aggregators group;
running the sync adds 43 currently-served models.
@rekram1-node

Copy link
Copy Markdown
Collaborator

AUTOMATED REVIEW:

  1. [P1] Image-generation models are emitted as text-only. requesty.ts hardcodes output to ["text"] despite exposing supports_image_generation. This incorrectly overrides the inherited image output for google/gemini-3.1-flash-image-preview.

  2. [P1] supports_reasoning is mapped to the wrong semantic. Requesty documents DeepSeek reasoning as automatic, while its API returns supports_reasoning: false for deepseek/deepseek-reasoner. The generated TOML consequently overrides the canonical reasoning = true with false.

  3. [P2] Synced files can never receive subsequent updates. sameModel() always returns true for both curated and sync-created files, so later pricing or limit changes from Requesty are permanently ignored. This undermines the stated catalog-sync purpose.

bun validate, the live Requesty dry-run, and the existing sync tests passed.

@rekram1-node

Copy link
Copy Markdown
Collaborator

AUTOMATED REVIEW: Blocking merge: sameModel() currently always returns true, so sync cannot update changed metadata. The translator also hardcodes text output, can overwrite canonical reasoning with false, and creates reasoning models without explicit reasoning_options. Please fix those cases and regenerate the catalog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants