Skip to content

feat(ai): add Impossibl as a built-in provider - #862

Open
JonathanFeller wants to merge 2 commits into
PrimeIntellect-ai:mainfrom
JonathanFeller:feat/impossibl-provider
Open

feat(ai): add Impossibl as a built-in provider#862
JonathanFeller wants to merge 2 commits into
PrimeIntellect-ai:mainfrom
JonathanFeller:feat/impossibl-provider

Conversation

@JonathanFeller

@JonathanFeller JonathanFeller commented Aug 7, 2026

Copy link
Copy Markdown

Adds Impossibl (https://impossibl.com) as a built-in provider. Impossibl is an AI gateway serving frontier models (Anthropic, OpenAI, Google, DeepSeek, Moonshot, Z.AI, Qwen, xAI, and others) over a single OpenAI-compatible API at https://api.impossibl.com/v1.

Models are sourced from the models.dev impossibl entry (75 tool-capable models at generation time), following the same pattern as the Hugging Face and Fireworks blocks.

Thinking levels are derived from models.dev reasoning_options. Each Impossibl route declares its verified reasoning controls in models.dev (effort values, budget_tokens, toggle, or none). The generator maps those declarations onto thinkingLevelMap — declared effort values pass through, undeclared levels are marked unsupported, none maps to pi's off, budget-only routes keep pi's default ladder (the gateway converts effort to a budget), and an empty declaration means reasoning happens with no client control. Because the gateway normalizes reasoning_effort itself, the per-family wire-value heuristics (applyThinkingLevelMetadata, the global DeepSeek V4 compat pass) skip impossibl models — the declared data is more precise than id-substring matching for a normalizing gateway.

Compat settings were verified against the live endpoint:

  • developer role accepted
  • reasoning_effort supported
  • store and strict tool mode not supported
  • Anthropic-style cache_control breakpoints accepted on message content (cacheControlFormat: "anthropic"); markers on tool definitions and cache_control.ttl are ignored upstream, hence supportsLongCacheRetention: false

The first commit is a pure catalog regeneration capturing models.dev drift since the last release, split out so the provider commit's generated diff contains only Impossibl entries. Drop it if you prefer to regenerate yourselves.

Testing:

  • npm run generate-models and npm run check pass
  • test/impossibl-models.test.ts covers model registration, compat, and the reasoning_options-derived thinking-level maps (effort, none-mapping, budget-only, empty-declaration, and non-reasoning cases)
  • Live smoke test through completeSimple against production: plain completion, reasoning at several levels (including clamped ones), and a tool call round-trip all succeed

Disclosure: I work on Impossibl.

Note

Add Impossibl as a built-in AI provider

  • Registers impossibl as a KnownProvider with IMPOSSIBL_API_KEY env var support and anthropic/claude-sonnet-5 as the default model.
  • Adds model generation logic in generate-models.ts to pull Impossibl models from the models.dev catalog using OpenAI Completions-compatible settings and Anthropic-style cache breakpoints.
  • Derives thinkingLevelMap per model from reasoning_options in the models.dev response, skipping the generic provider heuristics used for other providers.
  • DeepSeek compatibility overrides are explicitly skipped for Impossibl routes, since Impossibl normalizes DeepSeek to plain OpenAI semantics.

Macroscope summarized 925ff18.

Catalog drift from models.dev and live provider endpoints since the last
regeneration; no generator changes.
Registers Impossibl (api.impossibl.com) as a built-in provider, with
models sourced from the models.dev catalog over the OpenAI-compatible
Completions API.

- generate-models.ts: process the models.dev impossibl entry; compat
  mirrors the live endpoint (no store/strict support, developer role
  accepted, reasoning_effort supported, Anthropic-style cache_control
  breakpoints on message content, no long cache retention)
- thinking-level maps are derived from each route's models.dev
  reasoning_options declaration; the gateway normalizes
  reasoning_effort itself, so the per-family wire-value heuristics
  (applyThinkingLevelMetadata, DeepSeek V4 compat pass) are skipped
- IMPOSSIBL_API_KEY env var and auth.json key
- display name, default model, docs, and changelog entries
- catalog test covering model registration, compat, and derived
  thinking level metadata
@JonathanFeller
JonathanFeller force-pushed the feat/impossibl-provider branch from 04ebce3 to 925ff18 Compare August 7, 2026 17:43
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