Skip to content

ultracode在长上下文的时候不适配openai接口 #14

Closed

Description

@kexinoh
Image 如图....

Activity

  1. OnlyTerp commented on Jun 11, 2026

    @OnlyTerp
    Owner

    Fixed in integration branch integrate/open-prs-and-issues (PR #16):

    Tool-only assistant turns: OpenAI-compat backends that enforce strict JSON schema now get content: null (not empty string "") when an assistant message has only tool_calls and no text. This matches what strict upstreams expect.

    Context-length 400s: When upstream returns errors mentioning context length / maximum context, the proxy now attaches a clearer hint in logs/responses pointing at session compaction, shorter prompts, or switching to a larger window route (including [1m] where configured).

    If you're still hitting failures after updating, please paste the exact upstream error text (or a redacted screenshot) and which backend route/model you had selected — that'll help confirm whether it's the tool-only case, a true overflow, or something else.

  2. added 2 commits that reference this issue on Jun 11, 2026
  3. devin-ai-integration commented on Jun 18, 2026

    @devin-ai-integration
    Contributor

    Already resolved on main (landed via PR #16): openai_compat tool-only assistant turns now send content: null for strict-schema backends, and upstream context-length errors get a clearer hint (compaction / shorter prompt / larger-window [1m] route). This behavior is verified by the offline 'openai_compat long-context hygiene: tool-only content=null + context hint' self-test in test_proxy.py, which passes in CI on #28. Closing as fixed; please reopen with the exact upstream error text + selected route if you still hit it.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions