Skip to content

Parse stream_tokens config explicitly in LangGraph adapter#9

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-code-review-comment
Draft

Parse stream_tokens config explicitly in LangGraph adapter#9
Copilot wants to merge 4 commits into
mainfrom
copilot/fix-code-review-comment

Conversation

Copilot AI commented May 22, 2026

Copy link
Copy Markdown
Contributor

This addresses the review feedback on PR #7 around stream_tokens handling in the LangGraph adapter. The adapter previously used Python truthiness, so non-empty string values like "false" incorrectly enabled token streaming.

  • Config parsing

    • Replaced bool(stream_tokens) with explicit coercion for untyped config values.
    • Supports common boolean-like string inputs ("true", "false", "1", "0", "yes", "no", "on", "off").
    • Preserves the existing default of true when the field is omitted or unrecognized.
  • Focused test coverage

    • Added adapter tests covering string-valued stream_tokens inputs to ensure "false" disables token streaming and "true" enables it.
    • Kept the change scoped to the reviewed behavior only.
stream_tokens = _coerce_bool(
    run_state.config.get("stream_tokens"), default=True
)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/npm ci (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Gggao408 and others added 2 commits May 22, 2026 15:53
- Introduced `emit_step_updated` and `emit_token_delta` methods in the AdapterContext for handling real-time metrics and token streaming.
- Updated LangGraphAdapter to support streaming token deltas and deferred step metrics, improving responsiveness during model invocation.
- Modified RunService to handle new event types `step.updated` and `token.delta`, ensuring proper state management and broadcasting.
- Enhanced API documentation to reflect new event types and their payload structures.
- Added tests to verify the functionality of token streaming and step updates in the LangGraph adapter.
Copilot AI and others added 2 commits May 22, 2026 08:38
…ew-comment

Co-authored-by: Emiyaaaaa <37606228+Emiyaaaaa@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Emiyaaaaa/HiveMind/sessions/fd61a3c4-b3cb-4cf4-bdb1-e0d4dbe53260

Co-authored-by: Emiyaaaaa <37606228+Emiyaaaaa@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code according to review comment Parse stream_tokens config explicitly in LangGraph adapter May 22, 2026
Copilot AI requested a review from Emiyaaaaa May 22, 2026 08:44
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.

3 participants