Skip to content

Conversation

@shirgoldbird
Copy link
Member

@shirgoldbird shirgoldbird commented Dec 24, 2025

The context parameter is often misunderstood. We have 2 separate guides to it right now, neither of which fully describe its intended use. Let's unify those and clean them up!


### Size limit

There is no size limit for the `context` parameter itself, but the request body size limit of 128 KiB applies to all text translation requests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For classic models, the maximum context taken into account was 5 sentences, but I do not know how it works with next-gen. Is it truly unlimited except for request body size?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an expert but we don't impose any size limitations on the context field for users (beyond the 128KiB request size limit). When translating I believe that for both model types we'll just use the last 5 sentences but I don't believe we expose that limitation to the user.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like we should leave this as-is then?


### Size limit

There is no size limit for the `context` parameter itself, but the request body size limit of 128 KiB applies to all text translation requests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an expert but we don't impose any size limitations on the context field for users (beyond the 128KiB request size limit). When translating I believe that for both model types we'll just use the last 5 sentences but I don't believe we expose that limitation to the user.

@shirgoldbird shirgoldbird merged commit 25f667f into main Jan 7, 2026
2 checks passed
@shirgoldbird shirgoldbird deleted the 199-improve-docs-for-context-param branch January 7, 2026 19:11
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.

Improve docs for context param

4 participants