Skip to content

Support the long-context header #7

Open

Description

@VianneyMI

Context

A request longer than the model's context fails with a 400 whose detail is max_tokens_exceeded, which the SDK raises as ContextLengthExceededError. TypeSafe also documents the header TypeSafe-Danger-Zone-Long-Context: true for long context. What the header changes is unverified.

Goal

Let callers opt into long context, with its effect on limit and cost documented.

Scope

  • A long_context option on Jev and AsyncJev and on each evaluate call sends the header.
  • The ContextLengthExceededError docstring and the README point to the option.

Design considerations

  • A live probe records what the header changes (limit and cost), including whether it avoids max_tokens_exceeded, before the documentation states it.

Completion criteria

  • Tests check the header and a recorded fixture covers the long-context request.

Activity

  1. added this to the v0.4: Operations milestone on Nov 8, 2026
  2. added
    enhancement
    preview-api
    on Nov 8, 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

    enhancementpreview-api

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions