Skip to content

feat(cz-git): enhance OpenAI API integration with streaming support#252

Open
Zhengqbbb wants to merge 5 commits intomainfrom
feat/api-stream
Open

feat(cz-git): enhance OpenAI API integration with streaming support#252
Zhengqbbb wants to merge 5 commits intomainfrom
feat/api-stream

Conversation

@Zhengqbbb
Copy link
Copy Markdown
Owner

@Zhengqbbb Zhengqbbb commented Apr 21, 2026

Related ISSUE

Input follow ISSUE URL address

link: #250, #248

Type Of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📝 Document (This change requires a documentation update)
  • 🎨 Theme style (Theme style beautification)
  • ⚠ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🔨 Workflow (Workflow changes)

Clear Describe

  • Add support for thinking models
  • Introduced streaming capabilities for OpenAI API responses
  • Updated timeout settings for API requests to accommodate longer response times.
  • Adjusted maximum token limits for AI completions to improve output quality.

Test Case

  • GitHub model
  • DeepSeek
  • OpenRouter

Note

Medium Risk
Switches AI commit-subject generation from non-streaming JSON responses to SSE streaming parsing, which changes request/response handling and could affect provider compatibility or error cases. Also updates pnpm/workspace configuration, which may impact installs/hoisting across environments.

Overview
AI integration now uses streaming responses. fetchOpenAIMessage switches chat/completions calls to stream: true, raises max_tokens to 4096, extends request timeout to 60s, and adds SSE parsing via new shared/utils/stream.ts to assemble subjects (including multi-choice n).

Repo/tooling config cleanup. Bumps pnpm from 9.11.0 to 10.33.2, moves pnpm settings (hoisting, shell emulator, overrides, peer rules) from package.json/.npmrc into pnpm-workspace.yaml, and updates the lockfile accordingly.

Docs/minor regen changes. Updates DeepSeek example model to deepseek-v4-flash (EN/ZH) and refreshes generated VitePress components typings.

Reviewed by Cursor Bugbot for commit 9e5b3b5. Bugbot is set up for automated code reviews on this repo. Configure here.

- Add support for thinking models
- Introduced streaming capabilities for OpenAI API responses
- Updated timeout settings for API requests to accommodate longer response times.
- Adjusted maximum token limits for AI completions to improve output quality.

link: #250, #248
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for cz-git canceled.

Name Link
🔨 Latest commit 96cd38f
🔍 Latest deploy log https://app.netlify.com/projects/cz-git/deploys/69ed4a48f85b040008e5bbd6

Comment thread packages/cz-git/src/shared/utils/stream.ts
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9e5b3b5. Configure here.

Comment thread packages/cz-git/src/shared/utils/stream.ts Outdated
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 25, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

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