Skip to content

Dev/issue 1#147

Merged
lzsweb merged 8 commits into
mainfrom
dev/issue-1
Jun 18, 2026
Merged

Dev/issue 1#147
lzsweb merged 8 commits into
mainfrom
dev/issue-1

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Model
  • Application
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

kevin and others added 3 commits June 17, 2026 17:41
tiktoken's recursive BPE merging overflows the call stack on very
long inputs, causing pyo3_runtime.PanicException: StackOverflow.

Split text into chunks (<= 100k chars) at line boundaries before
encoding. Short text takes the original fast path unchanged.

Fixes #116
The server currently does not support session.finish event for
qwen3.5-omni-flash-realtime, returning an error instead of
session.finished. Previously end_session() would wait the full
timeout duration (20s) before falling back to ws.close().

Now the method detects server error events immediately and closes
the connection without waiting, reducing wait time from 20s to
<0.1s when the server rejects session.finish.

Related to issue #140

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several enhancements, including proxy support via trust_env=True in aiohttp sessions, incremental response merging for application streams, improved error handling during real-time audio session teardown, and text chunking in the Qwen tokenizer to prevent stack overflow on long inputs. The review feedback highlights critical issues: a potential AttributeError when merging responses due to a missing choices attribute, a risk of overwriting the default SDK user-agent header, the need to raise an exception rather than silently ignoring errors during session termination, and an O(N^2) performance bottleneck in the tokenizer's text-splitting logic.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread dashscope/app/application.py
Comment thread dashscope/app/application.py Outdated
Comment thread dashscope/audio/qwen_omni/omni_realtime.py Outdated
Comment thread dashscope/tokenizers/qwen_tokenizer.py
kevin and others added 5 commits June 17, 2026 18:27
- Add trust_env=True to base_api.py async task polling (issue #112)
- Extract user_agent from kwargs in api_request_factory to ensure
  incremental_to_full flag reaches HTTP header (issue #4)
- Update test to verify user_agent doesn't leak into request body

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lzsweb lzsweb merged commit 01278db into main Jun 18, 2026
3 checks passed
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.

2 participants