feat(ai): add Impossibl as a built-in provider - #862
Open
JonathanFeller wants to merge 2 commits into
Open
Conversation
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
force-pushed
the
feat/impossibl-provider
branch
from
August 7, 2026 17:43
04ebce3 to
925ff18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
impossiblentry (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 ontothinkingLevelMap— declared effort values pass through, undeclared levels are marked unsupported,nonemaps to pi'soff, 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 normalizesreasoning_effortitself, the per-family wire-value heuristics (applyThinkingLevelMetadata, the global DeepSeek V4 compat pass) skipimpossiblmodels — the declared data is more precise than id-substring matching for a normalizing gateway.Compat settings were verified against the live endpoint:
developerrole acceptedreasoning_effortsupportedstoreandstricttool mode not supportedcache_controlbreakpoints accepted on message content (cacheControlFormat: "anthropic"); markers on tool definitions andcache_control.ttlare ignored upstream, hencesupportsLongCacheRetention: falseThe 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-modelsandnpm run checkpasstest/impossibl-models.test.tscovers model registration, compat, and the reasoning_options-derived thinking-level maps (effort, none-mapping, budget-only, empty-declaration, and non-reasoning cases)completeSimpleagainst production: plain completion, reasoning at several levels (including clamped ones), and a tool call round-trip all succeedDisclosure: I work on Impossibl.
Note
Add Impossibl as a built-in AI provider
impossiblas aKnownProviderwithIMPOSSIBL_API_KEYenv var support andanthropic/claude-sonnet-5as the default model.thinkingLevelMapper model fromreasoning_optionsin the models.dev response, skipping the generic provider heuristics used for other providers.Macroscope summarized 925ff18.