Skip to content

fix(ai): ty v0.0.84 rejects calling a text output function with the text alone #510

Closed

Description

@dan-petty

Problem

uv run devops ci --force fails the uv check gate on every branch since uv fetched ty v0.0.84:

error[missing-argument]: No argument provided for required parameter 2
   --> src/devops_cli/ai/response_repair.py:307:40
307 |                 parsed_model = cast(T, schema.output_function(final_content))
info: Attempted to call union type `((RunContext[Any], str, /) -> Awaitable[Unknown] | Unknown) | ((str, /) -> Awaitable[Unknown] | Unknown)`

Root cause

TextOutput.output_function may take a RunContext and the text, or the text alone, and may be async. normalize_output_spec wraps any callable in text mode. The repair path calls it with the text alone, so:

  • a context-taking function raises TypeError, which a bare except Exception swallows, so the reply is not parsed;
  • an async function returns an un-awaited coroutine, which is cast to the schema type.

The new ty is right to reject the call.

Fix

Call the text output function only when it is synchronous and takes the text alone; otherwise leave the reply to the normal parsing path.

Note

uv check resolves the latest ty on each run, so a ty release can change the gate's verdict without any change to the code. uv check --ty-version can pin it, which trades reproducibility against the project's latest-tools policy.

Activity

  1. added this to the v0.2.23 milestone on Sep 24, 2026
  2. added
    type/bug
    scope/ai
    priority/p1-high
    status/in-progress
    on Sep 24, 2026
  3. added 2 commits that reference this issue on Sep 24, 2026
    42af0a6
    f09cf4a
  4. dan-petty commented on Sep 24, 2026

    @dan-petty
    OwnerAuthor

    Closed by #511, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  5. added a commit that references this issue on Sep 28, 2026
    ea49d6e
  6. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/aitype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions