Skip to content

Comments

Z.ai GLM-Image integration — Ascend Corp | EGG Digital#1522

Closed
anshulbasia27 wants to merge 3 commits intoPortkey-AI:mainfrom
anshulbasia27:gap/ml0kuyez9d5fe4vf-p1
Closed

Z.ai GLM-Image integration — Ascend Corp | EGG Digital#1522
anshulbasia27 wants to merge 3 commits intoPortkey-AI:mainfrom
anshulbasia27:gap/ml0kuyez9d5fe4vf-p1

Conversation

@anshulbasia27
Copy link

Summary

Add image generation (imageGenerate) support to the Z.ai provider for the GLM-Image / CogView models

Customer Gap

Customer: Ascend Corp | EGG Digital
Category: feature commitment
Gap: Support for Z.ai image generation (GLM-Image model) was promised with a target date of around Feb 20th. Commitment was made to keep customer updated if timeline changes.

"We do plan to support image generation with this model and it's on our near-term roadmap... targeting to have support available around 20th Feb"

References

Acceptance Criteria

  • POST /v1/images/generations with provider=z-ai and model=cogview-4-250304 (or GLM-Image) successfully proxies to Z.ai's /images/generations endpoint
  • The request body correctly maps OpenAI-compatible image generation params (prompt, model, n, size, response_format) to the Z.ai API
  • Successful Z.ai image generation responses are returned in OpenAI-compatible format with data array containing url/b64_json
  • Error responses from Z.ai are properly transformed with provider attribution (provider: 'z-ai')
  • The Z.ai provider index.ts exports both chatComplete and imageGenerate configurations
  • Gateway builds successfully with no TypeScript errors after changes

Changed Files

  • src/providers/z-ai/api.ts (modified)
  • src/providers/z-ai/imageGenerate.ts (added)
  • src/providers/z-ai/index.ts (modified)

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