Skip to content

develop - #20

Merged
mackong merged 2 commits into
mainfrom
develop
Jul 27, 2026
Merged

mackong merged 2 commits into
mainfrom
develop

Conversation

@mackong

@mackong mackong commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
  • fix(responses): apply legacy response-shell defaults for field parity
  • fix(responses): use legacy output-item id format ()

Summary

Converters Affected

Changes

  • Request conversion
  • Response conversion
  • Stream conversion
  • Tests added/updated
  • docs/field-conversions.md updated

Verification

  • npm run typecheck passes
  • npm run lint passes
  • npm test passes
  • npm run build succeeds

mackong added 2 commits July 27, 2026 14:54
convertResponse/emitCompleted echoed request-scoped fields with ?? null
fallbacks, so when the request omitted them the response reported null
where the legacy toOpenAIRespResponse applied API defaults
(temperature=1, top_p=1, truncation="disabled", text.verbosity="medium",
service_tier="default", background=false). It also omitted
conversation/prompt/user/safety_identifier/prompt_cache_retention that
legacy always emitted.

Match the legacy fallback map in echoRequestFields and the response
return: temperature??1, top_p??1, truncation??"disabled",
text ?? {format:{type:text},verbosity:medium}, service_tier from response
or "default", background??false, plus conversation:null, prompt:null,
user:null, safety_identifier:null, prompt_cache_retention:null.

Bump to 1.0.8. All 552 tests pass.
…pId>)

rosetta generated output-item ids as <prefix>_<random> (e.g. rs_o7o7rz4pwjf),
where the legacy converter used <prefix>_<choice.index>_<response.id>
(e.g. rs_0_chatcmpl-123). Align non-stream convertResponse and the
streaming convertStreamChunk/openMessage sites to the legacy format using
the CC response id and choice index. Remove the now-unused generateId().

Bump to 1.0.9. All 552 tests pass.
@mackong
mackong merged commit a7a1b92 into main Jul 27, 2026
2 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