refactor!: replace ModelRequestError with EmbeddingRequestError - #10
Merged
Conversation
TheGreatAxios
commented
Sep 25, 2026
TheGreatAxios
left a comment
Contributor
Author
There was a problem hiding this comment.
Review
Independent review of the stack found: bad base64 replies escaped as a raw DOMException or silently truncated vectors; non-integer indices were accepted; duplicate-index and non-JSON-200 coverage was lost; the live suite failed instead of skipping when the model was absent. All fixed in this stack (strict base64 decode, number.integer index, restored harness tests, model-aware skip).
Remaining notes: peer range >=0.4.0 follows sibling convention. Each commit typechecks, tests, and builds standalone.
TheGreatAxios
force-pushed
the
cl-9052-embedding-replace-copied-transport-and-modelrequesterror
branch
2 times, most recently
from
September 25, 2026 14:08
27a0c90 to
e51c19d
Compare
TheGreatAxios
force-pushed
the
cl-9052-embedding-replace-copied-transport-and-modelrequesterror
branch
from
September 25, 2026 15:14
e51c19d to
327108b
Compare
TheGreatAxios
force-pushed
the
cl-9052-embedding-replace-copied-transport-and-modelrequesterror
branch
from
September 25, 2026 17:36
327108b to
e8a3a43
Compare
TheGreatAxios
force-pushed
the
cl-9052-embedding-replace-copied-transport-and-modelrequesterror
branch
from
September 25, 2026 23:49
e8a3a43 to
334513d
Compare
This was referenced Sep 25, 2026
Every failure, including a malformed or short reply and an empty probe, throws EmbeddingRequestError carrying the classified InferenceError. ModelRequestError and the runJSONRequest/extractRetryAfterMs exports are gone; RequestDependencies and RetryAfterExtractor are exported as the types of EmbedOptions fields. Options are optional, with deps defaulting to global fetch and createDefaultScheduler(). Config is asserted against EmbedConfigSchema, replacing the hand-written batchSize RangeError, and request objects are explicit literals instead of conditional spreads. Also closes CL-9059, CL-9050, CL-9048, CL-9054, CL-9056.
TheGreatAxios
force-pushed
the
cl-9052-embedding-replace-copied-transport-and-modelrequesterror
branch
from
September 26, 2026 01:29
334513d to
d8692c4
Compare
TheGreatAxios
added this pull request to stack #15
September 26, 2026 01:58
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.
Summary
EmbeddingRequestError extends Errorwithreason: InferenceErrorandurl, classified by@intx/inferenceand retried viacreateDefaultRetryPolicy.ModelRequestErrorand therunJSONRequest/extractRetryAfterMsexports are removed; the transport is private.RequestDependenciesandRetryAfterExtractorare exported as the types ofEmbedOptionsfields.optionsis optional;depsdefaults to globalfetch+createDefaultScheduler(), resolved once perembedTextscall.EmbedConfigSchema(invalid config throws arktype'sTraversalError); request objects are explicit literals.Verification
bun run test(20 pass); CI passes.Closes CL-9052
Closes CL-9059
Closes CL-9050
Closes CL-9048
Closes CL-9054
Closes CL-9056