caelum0x 2a425b7e21 fix(toolgate): repoint Menivor adapters to the real /api/v1/jobs surface, drop menivor.tts.speak
Menivor's legacy /videos, /audio and /tasks/{id} routes are hidden under
MENIVOR_API_SURFACE=allowlist in production (confirmed live, 404 for every
caller). The real product surface is POST /api/v1/jobs + GET
/api/v1/jobs/{job_id}.

- menivor.video.render now POSTs /api/v1/jobs with layout fixed to
  captions_only, so it never needs a paid HeyGen avatar plan (every other
  layout is gated 402 sku_locked on the shared service account's free tier,
  confirmed live against api.menivor.com).
- menivor.video.status now polls GET /api/v1/jobs/{job_id}, the same id
  space render creates, and maps the new result_url field.
- menivor.tts.speak removed from the catalog (own.yaml + its capability
  entry): there is no standalone TTS job on /api/v1/jobs, and the separate
  POST /api/v1/media/audio gateway's flagship elevenlabs model can never
  take a caller voice_id (AudioBody has no such field — confirmed by
  reading app/domains/routing/providers/voice_gen.py), so it is a permanent
  elevenlabs requires a voice_id failure for every caller regardless of
  balance. The self-hosted tts/kokoro|chatterbox fallback's real
  availability is unverifiable from Toolgate; shipping it would be exactly
  the broken-tool-left-in-the-catalog outcome this fix exists to avoid.

Updated fixtures/contract tests for the new endpoints and response shape;
cargo test --workspace: 0 failures.
2026-11-18 01:46:51 +03:00

160 lines
6.7 KiB
YAML

# Our own products. Native adapters (typed Rust clients) serve these; the team's
# stored credential for the product wins, else the platform service credential.
- id: relay.chat.complete
capability: llm.chat
provider: relay
title: LLM completion through Relay
description: Any Relay model with your same sk-t0 key. Model names are `tensorzero::model_name::<model>`; `openai/gpt-oss-20b` and `openai/gpt-oss-120b` run on Groq's free tier with OpenRouter failover. Relay bills the tokens on the shared balance, so Toolgate adds no charge.
side_effect: read
auth: caller_key
price: { basis: per_call, micros: 0 }
timeout_s: 120
native: relay.chat.complete
example:
input: { model: "tensorzero::model_name::openai/gpt-oss-20b", messages: [{ role: user, content: "Say hi" }], max_tokens: 64 }
output: { content: "Hi!", model: "tensorzero::model_name::openai/gpt-oss-20b", usage: { prompt_tokens: 73, completion_tokens: 5 } }
- id: scribase.db.query
capability: db.query
provider: scribase
title: Read-only SQL on a Scribase database
description: Runs one read-only statement inside a bounded read-only transaction on a Scribase environment or branch. Needs your Scribase agent token (scb_agt_).
side_effect: read
auth: byo_required
price: { basis: per_success, micros: 50 }
timeout_s: 30
native: scribase.db.query
example:
input: { organization: acme, project: web, query: "select id, email from users limit 2" }
output: { columns: [id, email], rows: [[1, "a@acme.com"], [2, "b@acme.com"]] }
- id: scribase.db.branch.create
capability: db.branch
provider: scribase
title: Create a Scribase copy-on-write branch
description: A copy-on-write database branch for an agent task. Needs your Scribase agent token.
side_effect: write
auth: byo_required
price: { basis: per_success, micros: 10000 }
timeout_s: 60
native: scribase.db.branch.create
example:
input: { organization: acme, project: web, environment_id: agent-task-42 }
output: {}
- id: scribase.auth.magic_link.send
capability: auth.magic_link
provider: scribase
title: Send a Scribase magic link
description: Sends a passwordless sign-in link to an app user; delivery goes through Rally mail. Needs the project's anon key stored as your Scribase credential.
side_effect: send
auth: byo_required
price: { basis: per_success, micros: 400 }
timeout_s: 20
native: scribase.auth.magic_link.send
example:
input: { project_url: "https://acme.scribase.com", email: "user@example.com" }
output: { sent: true }
- id: rally.leads.search
capability: leads.search
provider: rally
title: Rally lead search
description: Companies or people from Rally's lawful data (registries, places, VC database), priced per result returned.
side_effect: read
auth: own_product
price: { basis: per_result, micros: 2000, unit: result, units_from: /limit, default_units: 25, max_units: 100 }
cache_ttl_s: 3600
idempotent: true
timeout_s: 30
requires_any: [[filters], [domains]]
native: rally.leads.search
example:
input: { kind: companies, filters: { industry: software, country: DE }, limit: 5 }
output: { results: [{ name: "Acme GmbH", domain: "acme.de" }], total: 1 }
- id: rally.company.enrich
capability: company.enrich
provider: rally
title: Rally company enrichment
description: Domain to company profile from Rally's data. Billed only when a company is found.
side_effect: read
auth: own_product
price: { basis: per_success, micros: 5000 }
cache_ttl_s: 86400
idempotent: true
timeout_s: 30
native: rally.company.enrich
example:
input: { domain: stripe.com }
output: { domain: stripe.com, company: { name: Stripe, industry: Payments } }
- id: rally.email.verify
capability: email.verify
provider: rally
title: Rally email verification
description: Syntax, MX (over DNS-over-HTTPS), disposable-domain and role-account checks. Billed per completed verification.
side_effect: read
auth: none
price: { basis: per_success, micros: 200 }
cache_ttl_s: 86400
idempotent: true
timeout_s: 15
native: rally.email.verify
example:
input: { email: "founder@stripe.com" }
output: { email: "founder@stripe.com", result: deliverable, checks: { syntax: true, mx: true, disposable: false, role: false } }
- id: rally.email.send
capability: email.send
provider: rally
title: Rally transactional send
description: One transactional email from a verified sender domain; the Idempotency-Key is forwarded so a retry never sends twice. $0.40 per 1,000 recipients.
side_effect: send
auth: own_product
price: { basis: per_unit, micros: 400, unit: recipient, units_from: /to, max_units: 50 }
timeout_s: 30
native: rally.email.send
example:
input: { from: "hello@acme.com", to: "user@example.com", subject: "Welcome to Acme", text: "Thanks for signing up." }
output: {}
# menivor.video.render/status target Menivor's real production surface,
# `POST /api/v1/jobs` + `GET /api/v1/jobs/{job_id}` (the legacy `/videos`,
# `/audio`, `/tasks/{id}` routes this used to call are gone from the public
# API under `MENIVOR_API_SURFACE=allowlist`, confirmed live 2026-11-18). The
# render call fixes `layout: captions_only` so it never needs a paid HeyGen
# avatar plan (every other layout is gated `402 sku_locked` on the shared
# service account's free tier, confirmed live). There is no standalone
# text-to-speech job on this API (every `/jobs` run renders a full video, and
# the separate `/api/v1/media/audio` gateway's TTS model can never take a
# `voice_id` from a caller, a real unconditional bug on Menivor's side) --
# `menivor.tts.speak` was removed from the catalog for this reason, 2026-11-18.
- id: menivor.video.render
capability: video.render
provider: menivor
title: Menivor short-video render
description: Subject or script to a rendered short video (captions over a background, no avatar). Async; returns a job id to poll with menivor.video.status (free). Priced per requested second.
side_effect: spend
auth: own_product
price: { basis: per_unit, micros: 20000, unit: second, units_from: /duration_s, default_units: 30, max_units: 180 }
timeout_s: 60
native: menivor.video.render
example:
input: { subject: "Three ways to cut your cloud bill", duration_s: 30, aspect: "9:16" }
output: { job_id: "8f3c1a2e", status: queued, poll: menivor.video.status }
- id: menivor.video.status
capability: video.status
provider: menivor
title: Menivor render status
description: Progress and final video URL for a render job. Free.
side_effect: read
auth: own_product
price: { basis: per_call, micros: 0 }
timeout_s: 15
native: menivor.video.status
example:
input: { job_id: "8f3c1a2e" }
output: { job_id: "8f3c1a2e", state: 1, progress: 100, videos: ["https://menivor.com/videos/8f3c1a2e/final-1.mp4"] }