Repository navigation
Conversation
Courtesy diff for the last release of this repo, so the change is reviewable here before the repo is retired. openai-client now lives in caffeinelabs/skills-internal under packages/connectors/openai, and 0.3.0 is published from there. Generated by openapi-generator 7.24.0 + the Motoko plugin (was 7.22.0), against the same spec and the same focusApis subset — so no model is added or removed, only regenerated: 114 files under src/, plus mops.toml, mops.lock, README.md and .openapi-generator/VERSION. What a reviewer should look for: - deps move to serde-core 0.2.1 / core 2.6.0 / moc 1.6.0, and the five transitive pins (cbor, itertools, base, xtended-numbers, sha2) disappear because serde-core 0.2.1 vendors them; - `defaultConfig.is_replicated` becomes `?false`, which for this API is a correctness and cost fix, not a tweak: a replicated outcall bills OpenAI once per replica (~13x), sends the bearer over 13 TLS connections, and cannot reach consensus on sampled completions; - the two sanitiser bugs this repo's clients tripped over are fixed upstream — the invalid variant tag `#_[Int]` now renders as `#one_of_2` / `#_Int_`, and OpenAI's `hate/threatening` style keys as `hate_threatening`, so all 220 files typecheck where 12 used to fail; - still NOT fixed, and worth knowing before anyone upgrades: converters for a generic `oneOf` remain stubbed with `Runtime.unreachable()`, so Embeddings, Moderations, Completions and Audio transcribe/translate now compile and then trap on the first request. Chat, Images, Models and Files are clean. Not for merging: the repo is going away, and mops already serves 0.3.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review only — please do not merge. This repo is being retired; the branch
exists so the final regen is reviewable here, next to the history it belongs
to.
openai-clienthas moved tocaffeinelabs/skills-internalunder
packages/connectors/openai, alongside x, weatherapi, slack, twilio,googledrive and the Google family. 0.3.0 is published from there
(skills-internal#292), so nothing needs to land in this repo.
The diff
118 files, +1244 / −1400. Generated by openapi-generator 7.24.0 + the Motoko
plugin (was 7.22.0), against the same spec and the same
focusApissubset — sono model is added or removed, only regenerated: 114 files under
src/, plusmops.toml,mops.lock,README.md,.openapi-generator/VERSION.is_replicated?falseindefaultConfigWorth a reviewer's attention
is_replicated = ?falseis a correctness and cost fix here, not a tweak. Areplicated outcall issues the request once per replica: OpenAI bills ~13×, the
Authorization: Bearer sk-…header crosses 13 independent TLS connections, andsampled completions can never agree byte-for-byte, so consensus fails anyway.
The generator config's "12 of 220
moc --checkfailures" note was stale —correcting what an earlier revision of this description said. Both sanitiser
fixes landed in
061160a, before 0.2.5 was cut, so this repo's HEAD alreadyhad them:
#_[Int]now renders as#one_of_2/#_Int_(
CreateCompletionRequestPrompt,CreateEmbeddingRequestInput);hate/threatening,self-harm/intent) now render ashate_threatening,self_harm_intent(the three moderation models).I typechecked this repo's
mainunder its own pinned toolchain (moc 1.4.1 /core 2.4.0 / serde-core 0.1.4): 220 passed, 0 failed — identical to 0.3.0.
So the regen changes no compile outcome; the note simply outlived the fix.
What is still broken — read before upgrading. Converters for a generic
oneOfare stubbed withRuntime.unreachable(): branches of mixed kinds(
Text | [Text] | [Int] | [[Int]]) cannot dispatch through one module. Thosefiles typecheck and trap on the first real request. 0.2.5 ships
byte-identical stubs, so this is not a regression — these APIs have never
worked in any published version.
EmbeddingsApi,ModerationsApiinputis requiredCompletionsApipromptis setAudioApitranscribe / translatetool_choice/function_callnullis safeextension-openai0.1.4 documents exactly this and steers builds onto the Chatpath; implementing the converters is a separate job in the generator repo.
After this
The package history stays reachable two ways once the repo goes: mops serves
every published version (0.2.5's tarball keeps its
src/,README.md,LICENSE,SKILL.md), and the git history — includingCHANGELOG.md,.github/, and the.openapi-generator/provenance that mops does not ship —is preserved in a local clone.
🤖 Generated with Claude Code