Skip to content

feat(klingai): load Kling video models through the @opencode/ai provider entrypoint - #13545

Open
rekram1-node wants to merge 2 commits into
devfrom
kling-video
Open

rekram1-node wants to merge 2 commits into
devfrom
kling-video

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

This points sdk.opencodeai on Kling's eight video models (kling-3.0, kling-3.0-omni, kling-3.0-turbo, kling-4.0, kling-4.0-flash, kling-v2-5-turbo, kling-v2-6, kling-video-o1) at @opencode/ai/providers/klingai/videos, which anomalyco/opencode#63684 adds. That entrypoint picks Kling's text-to-video, image-to-video or omni-video endpoint from the inputs and maps the models.dev IDs to Kling's path segments (kling-v2-6 to kling-2.6, kling-v2-5-turbo to kling-2.5-turbo, kling-video-o1 to kling-o1). The image models (kling-v3, kling-v3-omni, kling-image-o1, kling-v2-1) stay "none".

Merge order: hold this until anomalyco/opencode#63684 ships. Nothing in opencode loads video models until anomalyco/opencode#63666 lands either.

Verified with bun run validate.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [low] [possible mistake] providers/klingai/models/kling-v2-6.toml:21 (same change in all 8 files) - Check: sdk.opencodeai must name an @opencode/ai entry point that actually resolves when the catalog publishes it. Why: The new value @opencode/ai/providers/klingai/videos is schema-valid and follows the established media pattern (@opencode/ai/providers/xai/videos), but the PR body itself states it is added by upstream feat(ai): add Kling video generation opencode#63684, which has not shipped. Merging before a published @opencode/ai release exports providers/klingai/videos makes the v2 API advertise a load path that fails to resolve for all eight Kling video models. Action: Keep the stated hold and verify at merge time that the released @opencode/ai version actually exports providers/klingai/videos (e.g. confirm the shipped version resolves that subpath) before landing this.
  • [low] [possible mistake] providers/klingai/provider.toml:14 - Check: Leading header comments must stay factually consistent with the catalog data they document. Why: The header rationale opencodeai = "none": @opencode/ai has no Kling package (provider.toml:14, repeated in the four image model headers kling-v3.toml:8, kling-v3-omni.toml:9, kling-image-o1.toml:6, kling-v2-1.toml:9) is contradicted by this PR once the video models point at @opencode/ai/providers/klingai/videos. Since sync strips non-header comments, these blocks are the rationale of record, and a stale "no Kling package" claim will mislead future contributors adding Kling models. Action: Reword the affected comments to the accurate scope (no Kling images/chat entry point; videos now has one), at minimum in provider.toml:14, in this PR or the one that closes it out.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/klingai/models/kling-3.0.toml:33 (same sdk line in all 8 changed video model files) - Check: sdk.opencodeai must name an @opencode/ai entry point that consumers can actually import once the v2 API publishes it. Why: The PR body itself states @opencode/ai/providers/klingai/videos is only added by the still-open feat(ai): add Kling video generation opencode#63684, so no released @opencode/ai version resolves this path today; if this merges before that ships, the published v2 api.videos.sdk.opencodeai value fails on import for all eight Kling video models. The path itself is consistent with repo conventions (@opencode/ai/providers/<host>/videos, as xAI's grok video models use, and the PR's claimed ID→path mappings kling-2.6, kling-2.5-turbo, kling-o1 match the endpoints documented in these files' headers), but I cannot verify the upstream PR or its release status. Action: Before merging, verify the entrypoint has shipped in a released @opencode/ai version under exactly this path — an upstream merge alone is not enough, it must be published — and keep this PR on hold until then, as the PR body already specifies. No other changes are needed: the comment updates are accurate and in leading header blocks, the provider-level opencodeai = "none" remains correct with per-table overrides, and all models are v2_only = true so v1 is unaffected.

This branch was previously deployed

1 inactive deployment
release — 4631789c Deployed Nov 13, 2026 by rekram1-node via review #18746
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