Skip to content

Weir rounds through the public Ephemeris API - #87

Merged
tensorlink-dev merged 1 commit into
mainfrom
ephemeris-public-api
Oct 22, 2026
Merged

tensorlink-dev merged 1 commit into
mainfrom
ephemeris-public-api

Conversation

@tensorlink-dev

Copy link
Copy Markdown
Owner

The dashboard's paracast rounds currently call the raw backend at the old Chutes address, which runs image 0.7.5 without Timestral. This lets them call the public Ephemeris API instead. The API always fronts whatever backend customers use (Targon now), and it needs only a normal pc_live_ key, not the backend key.

Client (src/paracast_client.py): a base URL ending in /api/v1 switches to the public API. Raw-backend behaviour is unchanged.

  • Series are sent as {values, freq} objects. context_len is the full history length, because the API otherwise reads only the last 256 points and scores would stop being comparable.
  • Every forecast carries an Idempotency-Key, reused across retries, so a retry after a timeout replays the result instead of paying again.
  • /models (a bare list on the public API) is unwrapped, so panel() works the same.
  • Health comes from /api/status and is mapped onto the raw /health shape.
  • Batches are capped to the API's 120,000 output values per request (series × horizon × 19 quantiles). Without this, horizons above ~98 would get a 400 and the model would silently drop out of the round.
  • Feedback goes to /api/v1/feedback, added in TensorLink-AI/paracast-web#43. Until that ships, feedback calls 404, are counted as failed, and never block a round.

Workflow: for public URLs the wake step reads /api/status. I ran it against production: panel ok -- 7 healthy workers.

Tests: 6 new tests (flavour detection, request shape and key, key reuse on retry, models/status mapping, output-budget batching, feedback route). All 20 client tests pass and ruff is clean.

To switch after merging:

  • PARACAST_URL = https://ephemeris.cascade.industries/api/v1
  • PARACAST_API_KEY = an Ephemeris key on a funded internal account

A round is about 256 series × (each of 7 models + ensemble + route), billed at the model prices: roughly 5k credits per round, about 10k a day at two rounds.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FAm6t3mTkhrKZKke8GzULi

ParacastClient now accepts the public API (base URL ending in /api/v1) as well
as the raw backend: series sent as {values, freq} objects with the full history
as context_len, an Idempotency-Key per request reused across retries, /models
list unwrapped, health read from /api/status, and batches capped to the API's
120,000 output-value budget. Feedback goes to the gateway's /api/v1/feedback.
The round workflow's wake step reads the public status page for such URLs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAm6t3mTkhrKZKke8GzULi
@tensorlink-dev
tensorlink-dev merged commit 5c0716b into main Oct 22, 2026
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.

1 participant