Skip to content

Preserve Responses and Chat semantic fields and reject unsafe missing tool IDs #26

Closed

Description

@NOirBRight

Problem

External audit reconciliation confirmed that Responses ↔ Chat conversion can silently drop or degrade semantic data, including reasoning/refusal/search/custom tool/file/audio/annotations and tool-call identity. In some paths missing tool ids are replaced with random ids, which can break follow-up tool-output pairing.

Scope

  • Fix semantic field preservation where a safe mapping exists.
  • Reject or explicitly surface unsupported/missing tool id cases instead of silently generating incompatible ids.
  • Cover failed/incomplete converter edge cases without claiming primary relay behavior is currently broken.
  • Prefer doing this after the protocol translation seam issue.

Acceptance Criteria

  • Reasoning/refusal/search/custom tool/file/audio/annotation behavior is either preserved or explicitly reported as unsupported.
  • Missing assistant tool-call ids or tool result ids no longer silently produce unpairable random ids in unsafe paths.
  • Tests cover both body conversion and streaming conversion edge cases.
  • Existing third-party compatibility behavior remains documented.

Required Verification

python -m pytest tests/test_chat_completions_gateway.py tests/test_routing.py

Related

Activity

  1. added
    needs-triageMaintainer needs to evaluate this issue
    bugSomething isn't working
    ready-for-agentFully specified, ready for an AFK agent
    and removed
    needs-triageMaintainer needs to evaluate this issue
    on Jul 9, 2026
  2. NOirBRight commented on Jul 9, 2026

    @NOirBRight
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Preserve protocol semantic fields and fail safely on unpairable tool IDs.

    Current behavior:
    System.Collections.Hashtable.Current

    Desired behavior:
    System.Collections.Hashtable.Desired

    Key interfaces:

    • Protocol translation seam
    • Tool-call identity mapping
    • Unsupported protocol/error reporting

    Acceptance criteria:

    • Reasoning/refusal/search/file/audio/annotation behavior is preserved or explicitly unsupported.
    • Unsafe missing tool ids are rejected or surfaced rather than randomly paired.
    • Tests cover body and streaming conversion edge cases.

    Out of scope:

  3. self-assigned this
    on Jul 12, 2026
  4. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Dispatch — Profile: core; Model: gpt-5.6-terra / max; Base: origin/dev@4b55cca647291f57b191176663310f983d1ae388; Branch: codex/issue-26-semantic-preservation; Ownership: protocol_translation semantic preservation/fail-closed behavior, minimal live delegates, and focused body/stream tests; Exclusions: no retry/transport/concurrency changes, no RoutePlan work from #61, no capability claims from #62-#67; Verification: targeted Chat/routing/protocol tests, full Python, report-only gate; Integration: sole production Python Gateway/protocol writer, one PR to dev, unlocks #66.

  5. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Completed by merged PR #103 on dev at 7ff90d5. Focused/full verification and all required CI checks passed; the semantic-preservation seam now provides the required base for #105.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions