Skip to content

fix(translate): accept consecutively reported upstream choices - #711

Merged
Menci merged 3 commits into
mainfrom
fix/translate-choice-cardinality
Nov 12, 2026
Merged

Menci merged 3 commits into
mainfrom
fix/translate-choice-cardinality

Conversation

@Menci

@Menci Menci commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Accept consecutive upstream choices beyond the requested count while retaining index validity and sequence checks. Remove the request-count ceiling from the builder and event routing; single-choice client protocols retain their representability checks.

Validated with five named files (142 tests), translate TypeScript and scoped lint. Independent prerequisite for #673.

Remove the request-count ceiling from output IR construction and Chat event routing while requiring sequential valid indexes. Verify that every upstream choice is retained and skipped indexes still fail.
Keep the reviewed choice-count rationale beside the owning builder and gap assertion. Additional consecutive choices remain valid and skipped indexes remain malformed.
…cardinality

# Conflicts:
#	packages/translate/__tests__/protocols/edge-cases_test.ts
#	packages/translate/__tests__/protocols/openai-chat-completions/as-target/events_test.ts
#	packages/translate/src/protocols/anthropic-messages/via-openai-chat-completions/events.ts
#	packages/translate/src/protocols/anthropic-messages/via-openai-chat-completions/translate.ts
#	packages/translate/src/protocols/gemini-generate-content/via-openai-chat-completions/events.ts
#	packages/translate/src/protocols/gemini-generate-content/via-openai-chat-completions/translate.ts
#	packages/translate/src/protocols/openai-responses/via-openai-chat-completions/events.ts
#	packages/translate/src/protocols/openai-responses/via-openai-chat-completions/translate.ts
@Menci
Menci marked this pull request as ready for review November 12, 2026 14:06
@Menci
Menci merged commit 9ea7c86 into main Nov 12, 2026
21 checks passed
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.

1 participant