Evaluates and configures LLM models and providers generically across any backend (direct APIs, cloud platforms, inference hosts, aggregators, and local engines): full input/output modality contracts (image formats/resolutions, video duration/fps/audio, PDF/audio limits, context windows, structured output schemas), quantization (bf16/fp8/int4), temperature, reasoning budget, uptime, speed, and provider pinning. Use before choosing or changing any model, editing agents/ or aqven.config.ts, or d...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Aqven Models?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/lastonoga-aqven-models)
---
name: aqven-models
description: Evaluates and configures LLM models and providers generically across any backend (direct APIs, cloud platforms, inference hosts, aggregators, and local engines): full input/output modality contracts (image formats/resolutions, video duration/fps/audio, PDF/audio limits, context windows, structured output schemas), quantization (bf16/fp8/int4), temperature, reasoning budget, uptime, speed, and provider pinning. Use before choosing or changing any model, editing agents/ or aqven.config.ts, or debugging modality rejections, truncation, 429s, or slow/flaky runs.
---
# Provider-Agnostic Model Selection & I/O Contracts (`aqven-models`)
## MUST
1. **Verify the full Input & Output Interface Contract before selecting any model:** Never assume "multimodal" or "128k context" means a model accepts your exact file format, resolution, duration, or JSON schema depth. Map every input and output constraint first (Step 1).
2. **Stay provider- and model-agnostic:** Respect `Owner's rules` in `AGENTS.md` (allowed providers, privacy/retention policy, cost & latency ceilings). Query live provider documentation or model endpoints across all allowed providers — never pick from memory or habit.
3. **Lock execution variables during experiments:** Whether using a direct API, cloud platform, aggregator, or local server, pin the exact backend/snapshot, `temperature`, and `reasoning` settings so A/B comparisons never mix different precisions or hidden defaults.
4. **Catalogue metadata suggests; one live call on the real probe node proves:** Always verify a candidate model on 1 real item of each input modality (`image`, `video`, `audio`, `pdf`, long text) with your actual output Zod schema before running a dataset.
---
## Step 1: Audit the Model's Input & Output Interface Contract
Before writing or changing an agent, fill out every applicable row for the candidate model from its current provider documentation / API metadata:
### 1A. Input Modalities & Physical Limits
| Modality | What you MUST check per model & provider | Classic failure if ignored |
|---|---|---|
| **Text / Context** | Nominal `context_length`, `max_prompt_tokens`, effective quality window (long-context recall drop-off), tokenization ratio on non-Latin scripts / JSON / code. | Sending a 200-page document whole because it fits nominal context -> model silently ignores the middle/tail. |
| **Images** | Accepted MIME types (`jpeg`, `png`, `webp`, `gif` — `heic`, `tiff`, `bmp`, `svg`, `avif` are often rejected!), max images per request, max MB per image/payload, **provider auto-resize edge** (e.g. downscaling >`1568px` or >`1024px`), tile token formula. | Sending a `4000px` receipt/blueprint whole -> provider downscales it and fine print becomes unreadable (send EXIF-upright native crops `Image[]` instead!). |
| **Video** | Accepted containers & codecs (`video/mp4` H.264, `webm` vs `.mov`/HEVC), **max duration (seconds/minutes)**, max MB (inline base64 vs file-upload URI requirement), **internal frame sampling rate (fps)**, and **whether the embedded audio track is processed or ignored**. | Provider samples video at `1 fps` and misses a `0.3s` defect, or silently drops the spoken audio track inside an `.mp4`. |
| **Audio** | Accepted formats (`wav`, `mp3`, `flac`, `ogg`, `aac`), **max duration (seconds/minutes)** & MB, sample-rate handling, **mono vs stereo channel preservation**, timestamp accuracy vs using a dedicated STT step first. | Provider mixes a 2-channel call down to mono, destroying caller-vs-agent speaker attribution. |
| **PDF / Docs** | Native vision PDF (`application/pdf` page renders + text) vs text-only extraction, **max pages & max MB per request**, page rotation handling. | Scanned PDF with no text layer sent to a text-only document parser -> empty content. |
### 1B. Output Interface, 4 Call Outcomes & Portable Schema Subset
Every model call lands on **one of 4 outcomes before JSON parsing**: `ok`, `error` (provider/malformed tool call), `truncated` (`finish_reason: "length"`), or `refusal`. **Never treat `truncated` or `refusal` as a schema mismatch to repair** — fix token/reasoning budgets or refusal triggers instead.
| Output Dimension | What you MUST check | Classic failure if ignored |
|---|---|---|
| **Output Modalities** | Text only, native constrained JSON (`structured_outputs` / `response_format`), tool-calling JSON, or native media output (`image` / `audio` generation limits, resolution, duration/seconds). | Requesting `structured_outputs` on an endpoint that only supports `json_object` or tool calls -> `MODEL_FEATURE_UNSUPPORTED`. |
| **Schema State Space & Portability** | Max nesting (`<= 2–3` levels safe everywhere), `anyOf` + literal discriminator (avoid `oneOf`: rejected by OpenAI strict, ignored by Gemini; Anthropic does not natively enforce numeric/length bounds in grammar), and state ceiling (`maxItems` × enum count). | Large enum × array (`60` values × `50` items) exceeds grammar compiler -> `OUTPUT_SCHEMA_REJECTED`. Self-hosted `vLLM`/`SGLang` rely on `XGrammar` (fast for flat/cached schemas) or `llguidance`. |
| **Token Ceiling & Reasoning** | `max_output_tokens` / `max_completion_tokens`, and **whether hidden `reasoning` / `thinking` tokens consume that same budget**. | Reasoning tokens eat `3,800 / 4,096` tokens -> JSON cuts off mid-string (`finish_reason: length`). |
---
## Step 2: Provider Families & Backend Routing
AQVEN runs on VoltAgent + AI SDK providers, supporting any backend architecture without lock-in:
1. **Direct First-Party APIs** (`@ai-sdk/openai`, `@ai-sdk/anthropic`, `@ai-sdk/google`, `@ai-sdk/mistral`, `@ai-sdk/xai`, `@ai-sdk/deepseek`, …):
- Single authoritative upstream, predictable precision, native provider features (prompt caching, batch APIs, file upload APIs for large video/PDF). Pin dated model snapshots where offered.
2. **Cloud Enterprise Platforms** (AWS Bedrock, Google Vertex AI, Azure):
- Regional residency, IAM auth, enterprise ZDR/SLAs. Verify which model versions and modalities are enabled in the target region.
3. **Dedicated Inference Hosts** (Groq, Fireworks, Together, Cerebras, Nebius, DeepInfra, …):
- High-throughput open-weight serving. Check each host's exact quantization (`bf16` vs `fp8` vs `int4`), context cap (sometimes lower than base model!), and grammar decoding support.
4. **Multi-Backend Aggregators & Gateways** (e.g. OpenRouter, LiteLLM, Vercel AI Gateway):
- One model ID routes across multiple upstream hosts that **differ in quantization, max tokens, parameter support, uptime, and speed**.
- Always query the gateway's live model & endpoint APIs rather than trusting generic model names. *Example (OpenRouter public API, no key required):*
```bash
# 1) Filter catalogue by input modality (text, image, file, audio, video) & structured_outputs
curl -s 'https://openrouter.ai/api/v1/models?input_modalities=image&supported_parameters=structured_outputs'
# 2) Inspect per-upstream quantization, uptime_last_30m, throughput_last_30m, latency_last_30m, max_completion_tokens
curl -s 'https://openrouter.ai/api/v1/models/<author>/<slug>/endpoints'
```
- **Prevent the "Routing Lottery":** By default on aggregators (`require_parameters: false`), `structured_outputs` is only a *soft preference* — requests can silently route to backends that drop schema enforcement or hang on experimental `fp4` builds! Always set `require_parameters: true`. Flag single-upstream models (`429` has nowhere to fail over); pin one upstream (`allow_fallbacks: false`) during experiments and order verified upstreams with an explicit precision floor in production.
5. **Local / Self-Hosted Engines** (`vLLM`, `SGLang`, `TensorRT-LLM`, `Ollama`, `llama.cpp`):
- Connect via OpenAI-compatible `baseURL`. Match `aqven.config.ts` `capacity` to GPU batch slots and enable engine-level guided JSON decoding.
---
## Step 3: Quantization, Temperature, Reasoning, Uptime & Speed
- **Quantization (`bf16` / `fp16` vs `fp8` vs `int8` / `int4`):**
- `bf16` / `fp16`: Uncompressed reference baseline; zero quantization logit drift.
- `fp8`: Hopper/Ada sweet spot (~2x faster/cheaper than `bf16` with near-identical structured-output fidelity).
- `int8` / `int4` (AWQ/GPTQ/GGUF): Compresses next-token logit gaps, increasing **flip rates on borderline classifications** and **nested schema errors**. Never deploy `int4` without comparing against `bf16`/`fp8` on a 10-run `stabilize` matrix; keep schemas flat and lock `temperature: 0`.
- **Temperature (`callDefaults: { temperature }`):**
- **`temperature: 0` (Default):** Use greedy decoding for all deterministic extraction, classification, ID mapping, and auditing probes. Note: even at `temperature: 0`, non-batch-invariant GPU kernels cause minor run-to-run float variance — never rely on byte-identical strings; verify semantic repeatability with `stabilize` (`pass^m`).
- **`temperature > 0`:** Reserve strictly for intentional diversity (e.g. creative generation or multi-sample exploration reconciled downstream). Check whether your chosen reasoning model ignores `temperature`.
- **Reasoning / Thinking Controls:**
- Set reasoning explicitly in `providerOptions` using the target provider's native key (`thinking` on Anthropic, `reasoningEffort` on OpenAI/xAI, `thinkingConfig` on Google, `reasoning` on aggregators).
- Default to `"none"` / disabled for fast extraction & routing; measure `"low"` / `"medium"` as an isolated `--matrix` variant when hard reasoning is needed, and size `maxOutputTokens` for `reasoning + JSON`.
- **Uptime, Throughput (tok/s), Latency (TTFT), Mini-Benchmarks & Concurrency Lanes:**
- Check recent uptime (`>= 99%`), TTFT (critical for multi-turn `andCriticLoop`), and output tok/s (flag `3x` slower outliers to the owner immediately).
- When an aggregator shows `3x+` latency outliers or `finish_reason: "length"` runaways on a model, run a **1-call provider mini-benchmark** across 3–4 candidate upstreams on one real heavy prompt (comparing `TTFT`, `tok/s`, and `finish_reason`) before swapping models or pinning an upstream.
- Configure rate-limit and concurrency lanes in `aqven.config.ts` (`providers[id] = { capacity, ratePerMinute, models }`). Never mask `429`s by silently cutting dataset items or stability repeats.