Skip to content

feat(providers): add Turion decisions and extraction provider - #49535

Open
balys wants to merge 5 commits into
BerriAI:mainfrom
balys:feat/turion-provider
Open

balys wants to merge 5 commits into
BerriAI:mainfrom
balys:feat/turion-provider

Conversation

@balys

@balys balys commented Oct 31, 2026 •

Copy link
Copy Markdown

We are adding Turion provider for decision and extraction models. Turion has trained and hosts Turion jev 31b (SystemOne Decision model), and Turion Extract Alpha (Extraction model, same class as Cloudflare Clairic , same field format). This allows LiteLLM users to call both via /v1/decision and /v1/extraction with turion api key

Turion JEV tied #2 on decision index : https://huggingface.co/spaces/multimodalart/jev-decision-index
Turion Extract #1 (above cloudflare) on extract index https://huggingface.co/spaces/balys/extract-index

Details

TLDR

Problem this solves:

  • Turion's decision and extraction models can't be called through LiteLLM
  • Turion is missing from the Add Model provider picker

How it solves it:

  • Registers Turion through the shared System One decision flow (/v1/systemone)
  • Registers Turion as the second extraction provider, after Cloudflare (/v1/extract)
  • Adds the two models to the cost map and the dashboard provider metadata

User Flow

Before: a developer with a Turion key can't route decisions or extractions to Turion

  1. The proxy admin adds turion/turion-jev-31b and turion/turion-extract-alpha to model_list
  2. The developer sends POST /v1/systemone, /v1/decisions and /v1/extraction naming those models
  3. Each call fails instead of reaching Turion

After: the same calls reach Turion and come back with typed answers and usage

  1. The proxy admin adds the same two models with api_key: os.environ/TURION_API_KEY
  2. POST /v1/systemone and /v1/decisions return Jev's noul, choice and score answers with input-token usage
  3. POST /v1/extraction returns typed values with spans, confidence, truncated: false and usage
  4. In Add Model, Turion appears as a provider with turion/turion-jev-31b as the placeholder

Implementation

TurionDecisionsConfig only sets the host (https://api.turion.ai, TURION_API_BASE overrides) and the key variables (TURION_API_KEY, then the Turion CLI's TURION_API_TOKEN), like the Nace and TypeSafe adapters. It reuses BaseDecisionsConfig for transport, request translation and response parsing, so both /v1/systemone and /v1/decisions go to Turion's /v1/systemone, which takes TypeSafe's System One shape.

TurionExtractionConfig uses the same host and keys and sends the Clairic body unchanged to Turion's /v1/extract. Turion's answer matches ExtractionResponse: typed answers with p_null, confidence and span, truncated, and usage.

Cost map: turion/turion-jev-31b (mode evaluation, $0.021 per 1M input tokens) and turion/turion-extract-alpha (mode extraction, $0.05 per 1M input tokens), both 16,384-token context and free output, from https://turion.ai/docs/guides/usage/#pricing.

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required CI/CD checks (local make lint passes)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Local: uv run pytest tests/unit/llms/turion tests/unit/llms/base_llm/decisions tests/unit/proxy/public_endpoints/test_public_endpoints.py tests/code_coverage_tests/test_generate_provider_endpoints_support.py tests/unit/litellm_core_utils/test_decisions_pricing.py -q (214 passed), uv run python scripts/generate_provider_endpoints_support.py --check, make lint.

Main is merged in (Parallel AI's decisions change), and turion/turion-jev-31b now declares /v1/decisions and /v1/systemone in supported_endpoints, so the generated System One flag for turion is true. The Turion adapters are unchanged.

Screenshots / Proof of Fix

Live calls against https://api.turion.ai, no mocks. Set TURION_API_KEY privately and LITELLM_LOCAL_MODEL_COST_MAP=True to use this branch's cost map before it is published.

model_list:
  - model_name: turion-jev
    litellm_params:
      model: turion/turion-jev-31b
      api_key: os.environ/TURION_API_KEY
    model_info:
      mode: evaluation
  - model_name: turion-extract
    litellm_params:
      model: turion/turion-extract-alpha
      api_key: os.environ/TURION_API_KEY
    model_info:
      mode: extraction
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
python -m litellm.proxy.proxy_cli --config live-config.yaml --host 127.0.0.1 --port 4400
curl -sS "http://127.0.0.1:4400/v1/$ENDPOINT" \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
  -H "Content-Type: application/json" \
  --data-binary "@$ENDPOINT-request.json"

systemone-request.json asks a refund noul, a team choice and an urgency score about "I was charged twice for my subscription."; decisions-request.json asks the refund predicate in the OpenAI-style shape; extraction-request.json asks for an invoice number, issue date and total from "Invoice INV-2291 issued 2026-09-02, net 30. Total $1080.".

Before (36dbb22)

System One

  1. Run the command with ENDPOINT=systemone
  2. HTTP 400, There are no healthy deployments for this model (model group turion-jev)

Decisions

  1. Run the command with ENDPOINT=decisions
  2. HTTP 400, There are no healthy deployments for this model (model group turion-jev)

Extraction

  1. Run the command with ENDPOINT=extraction
  2. HTTP 400, There are no healthy deployments for this model (model group turion-extract)

After (248090a, before merging main)

System One

  1. Run the command with ENDPOINT=systemone
  2. HTTP 200, returned turion-jev-31b, refund noul 0.892483, team billing (0.991577), urgency score 1.128746, usage 409/0 input/output tokens

Decisions

  1. Run the command with ENDPOINT=decisions
  2. HTTP 200, returned turion-jev-31b, refund predicate probability 0.677155, usage 190/0 input/output tokens

Extraction

  1. Run the command with ENDPOINT=extraction
  2. HTTP 200, returned INV-2291 (span [8, 16]), 2026-09-02, 1080, truncated: false, usage 133/0 input/output tokens

Type

🆕 New Feature

Caveats (if any)

Low

  • No Turion logo yet; the dashboard shows the generic one
  • Context is 16,384 tokens on both models

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Turion hosts Turion Jev 31B, a System One decision model, and Turion
Extract alpha, an extraction model that answers Cloudflare Clairic's field
format. TurionDecisionsConfig sends decisions to /v1/systemone and
TurionExtractionConfig sends extractions to /v1/extract on
https://api.turion.ai (TURION_API_BASE overrides), authenticated with
TURION_API_KEY or the Turion CLI's TURION_API_TOKEN.

Adds the turion provider, the cost map entries for turion/turion-jev-31b
(evaluation) and turion/turion-extract-alpha (extraction), the provider
endpoint support entry, the Add Model credential fields, the dashboard
provider metadata and the README row.
@balys
balys force-pushed the feat/turion-provider branch from 6b0e5dc to 248090a Compare November 1, 2026 22:40
@CLAassistant

CLAassistant commented Nov 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

balys added 2 commits November 3, 2026 21:38
The provider endpoint files are generated from the cost map, so the row
names both routes the proxy serves for Turion, and the generated System One
flag for turion is true
# Conflicts:
#	litellm/_lazy_imports_registry.py
@veria-ai

veria-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Reviews

This branch has not been deployed

No deployments
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