Repository navigation
v1.0.57
Changes
Three new media providers walk into the registry, and OpenAI strict mode finally stops gaslighting us about $ref siblings. This PR ships Fal.ai, Kling AI, and MiniMax/Hailuo drivers (image + video + LLM where applicable) and fixes several long-standing rejections from OpenAI's strict JSON-schema mode and LM Studio's error reporting.
Highlights
- New provider: Fal.ai (image + video aggregator) with sync and async drivers
- New provider: Kling AI (image + video), including the
kling-v2-1default - New provider: MiniMax / Hailuo — LLM (
MiniMax-Text-01) plus video generation (MiniMax-Hailuo-2.3), withhailuoas an alias for video - OpenAI strict-mode extractions on nested Pydantic models now succeed instead of erroring out on
$defs,$refsiblings, or missingrequiredentries - GPT-5 family and o-series reasoning models (o1/o3/o4) work out of the box even before the capabilities KB knows about them
- LM Studio errors now surface the server's actual rejection reason (wrong model loaded, context overflow, schema issue) instead of an opaque HTTP status
Technical changes
- Add
fal_img_gen_driver.FalImageGenDriver,fal_video_gen_driver.FalVideoGenDriver, and async siblings underprompture/drivers/ - Add
kling_img_gen_driver.KlingImageGenDriver,kling_video_gen_driver.KlingVideoGenDriver, and async siblings; auth usesKLING_ACCESS_KEY+KLING_SECRET_KEY - Add
minimax_driver.MiniMaxDriver(LLM) andminimax_video_gen_driver.MiniMaxVideoGenDriver, plus async siblings; accepts eitherMINIMAX_API_KEYorHAILUO_API_KEY - Register all new providers in
provider_descriptors.pyviaProviderDescriptor+DriverSpec; wireminimaxinto_llm(...)for sync/async LLM dispatch andlist_models_kwargs/models_dev_name="minimax" - Add
hailuo→minimaxalias scoped to{"video_gen"} - Extend
infra/settings.pywithkling_*,minimax_*,hailuo_api_key, andfal_*fields, including sensible defaults (kling-v2-1,MiniMax-Text-01,MiniMax-Hailuo-2.3,fal-ai/flux/dev,fal-ai/kling-video/v2.6/pro/image-to-video) - Mirror the new env vars in
.env.copy prepare_strict_schema/_patch_strictininfra/cost_mixin.py:- Recurse into
$defsanddefinitionsso nested Pydantic v2 models getadditionalProperties: false(fixes'additionalProperties' is required to be supplied and to be falseon nestedBaseModels) - Strip sibling keywords from
$refnodes (e.g. Pydantic'sdescriptionalongside$ref) to satisfy OpenAI's$ref cannot have keywords {...}rule - Force-overwrite
requiredto list every property instead ofsetdefault, so partial Pydantic-emittedrequiredarrays no longer slip through - Walk
anyOf/oneOf/allOfsubschemas in addition topropertiesanditems
- Recurse into
- Add
_default_tokens_param(provider, model)incost_mixin.py: name-detectsgpt-5*,o1*,o3*,o4*and returnsmax_completion_tokens, so unknown OpenAI reasoning models don't 400 onmax_tokens lmstudio_driver.py/async_lmstudio_driver.py: on HTTP ≥ 400, raiseRuntimeErrorwith the response body (truncated to 500 chars) instead of lettingraise_for_status()discard it; async variant also handles non-JSON bodies explicitly- Add
tests/test_new_providers.pycovering the new Fal/Kling/MiniMax drivers