Skip to content

v1.0.57

Choose a tag to compare

@github-actions github-actions released this 13 May 02:17
f8c5e7a

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-1 default
  • New provider: MiniMax / Hailuo — LLM (MiniMax-Text-01) plus video generation (MiniMax-Hailuo-2.3), with hailuo as an alias for video
  • OpenAI strict-mode extractions on nested Pydantic models now succeed instead of erroring out on $defs, $ref siblings, or missing required entries
  • 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 under prompture/drivers/
  • Add kling_img_gen_driver.KlingImageGenDriver, kling_video_gen_driver.KlingVideoGenDriver, and async siblings; auth uses KLING_ACCESS_KEY + KLING_SECRET_KEY
  • Add minimax_driver.MiniMaxDriver (LLM) and minimax_video_gen_driver.MiniMaxVideoGenDriver, plus async siblings; accepts either MINIMAX_API_KEY or HAILUO_API_KEY
  • Register all new providers in provider_descriptors.py via ProviderDescriptor + DriverSpec; wire minimax into _llm(...) for sync/async LLM dispatch and list_models_kwargs / models_dev_name="minimax"
  • Add hailuo → minimax alias scoped to {"video_gen"}
  • Extend infra/settings.py with kling_*, minimax_*, hailuo_api_key, and fal_* 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_strict in infra/cost_mixin.py:
    • Recurse into $defs and definitions so nested Pydantic v2 models get additionalProperties: false (fixes 'additionalProperties' is required to be supplied and to be false on nested BaseModels)
    • Strip sibling keywords from $ref nodes (e.g. Pydantic's description alongside $ref) to satisfy OpenAI's $ref cannot have keywords {...} rule
    • Force-overwrite required to list every property instead of setdefault, so partial Pydantic-emitted required arrays no longer slip through
    • Walk anyOf / oneOf / allOf subschemas in addition to properties and items
  • Add _default_tokens_param(provider, model) in cost_mixin.py: name-detects gpt-5*, o1*, o3*, o4* and returns max_completion_tokens, so unknown OpenAI reasoning models don't 400 on max_tokens
  • lmstudio_driver.py / async_lmstudio_driver.py: on HTTP ≥ 400, raise RuntimeError with the response body (truncated to 500 chars) instead of letting raise_for_status() discard it; async variant also handles non-JSON bodies explicitly
  • Add tests/test_new_providers.py covering the new Fal/Kling/MiniMax drivers

Details