Version Packages - #13
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
smart-decisions@0.3.0
Minor Changes
#12
87127d5Thanks @expilu! - Breaking (pre-1.0): the provider settings onQuestionmoved into a newModeltype.apiBaseUrl,apiKeyandmodelno longer sit flat onQuestion; they are nowquestion.model.{apiBaseUrl, apiKey, model}. This groups everything about how themodel is reached and served into one reusable object to pass to every
choice().ModelgainsextraBody: extra fields forwarded verbatim into the chat completionsrequest body for engine- or model-specific settings (i.e.
chat_template_kwargsthinking toggles on llama.cpp/vLLM/SGLang,
reasoning_efforton OpenAI/OpenRouter/Ollama, Ollama's native
think). Reserved request keys the library's single-tokentrick depends on (
model,messages,stream,logprobs,top_logprobs,max_tokens,temperature) cannot be overridden through it;chat_template_kwargsmerges one level deep with user keys winning per key.
top_logprobs: 20instead of 50: 20 is the highestportable window (OpenAI and OpenRouter cap it at 20, vLLM's server default
--max-logprobsis 20). On llama.cpp (accepts up to 50) the smaller window isenough for realistic option counts.
Modeltype exported from the package root;generateTextaccepts extratop-level body fields via
ChatCompletionRequest's index signature.Hardening
redirect: 'error'): the Bearer tokenstays off unexpected paths, and a misconfigured base URL fails loudly.
unconditionally; an over-cap body fails fast and is not retried. A declared
Content-Lengthover the cap is refused before reading anything.maxRetries(i.e.NaN) no longer causes an infinite retry loop: itfalls back to the default, negatives clamp to 0 and fractions to whole attempts.
extraBodyignores__proto__andconstructorkeys, so prototype-smuggledconfig can never re-parent the request object.
top_logprobs(missing/null token) are skipped insteadof crashing mid-read.
credentials as query parameters cannot leak them into logs.
apiBaseUrlinstead of swallowing it, and an invalid base URL throws a clearInvalid model.apiBaseUrlerror.as an argv array (no shell), so interpolated values can never be re-parsed as
shell syntax.