fix(ai/core): properly handle custom separator in provider registry#5713
Merged
lgrammel merged 3 commits intovercel:mainfrom Apr 13, 2025
Merged
Conversation
lgrammel
approved these changes
Apr 12, 2025
c3acd5f to
1b126ab
Compare
lgrammel
added a commit
that referenced
this pull request
Apr 13, 2025
…5713) Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
samdenty
pushed a commit
that referenced
this pull request
Apr 15, 2025
* origin/v5: (36 commits) fix (provider): remove deprecated `Experimental_LanguageModelV2Middleware` (#5775) fix (ai): remove deprecated `options.throwErrorForEmptyVectors` from `cosineSimilarity()` (#5772) fix (ai/core): filter out empty content/text assistant messages (#5767) (#5783) fix (ai): remove deprecated `CoreTool*` types (#5768) chore: refactor text parts (spec) (#5759) feat(embedding-model-v2): add response body field (#5700) feat(embedding-model-v2): add providerOptions (#5698) chore: refactor reasoning parts (spec) (#5756) chore: update .gitignore (#5755) chore: refactor source parts (spec) (#5753) chore: refactor file parts (spec) (#5750) chore: refactor tool call and tool call delta parts (spec) (#5746) fix(providers/xai): edit supported models for structured output (#5715) (#5741) chore (ai): remove provider re-exports (#5734) chore (provider): extract shared provider options and metadata (spec) (#5733) fix(ai/core): properly handle custom separator in provider registry (#5713) (#5732) chore (providers/xai): update grok-3 model aliases (#5646) chore(embedding-model-v2): rename rawResponse to response (#5699) chore(providers/mistral): convert to providerOptions (#5675) chore: refactor file towards source pattern (spec) (#5709) ...
samdenty
pushed a commit
that referenced
this pull request
Apr 15, 2025
…der-options * origin/v5: (36 commits) fix (provider): remove deprecated `Experimental_LanguageModelV2Middleware` (#5775) fix (ai): remove deprecated `options.throwErrorForEmptyVectors` from `cosineSimilarity()` (#5772) fix (ai/core): filter out empty content/text assistant messages (#5767) (#5783) fix (ai): remove deprecated `CoreTool*` types (#5768) chore: refactor text parts (spec) (#5759) feat(embedding-model-v2): add response body field (#5700) feat(embedding-model-v2): add providerOptions (#5698) chore: refactor reasoning parts (spec) (#5756) chore: update .gitignore (#5755) chore: refactor source parts (spec) (#5753) chore: refactor file parts (spec) (#5750) chore: refactor tool call and tool call delta parts (spec) (#5746) fix(providers/xai): edit supported models for structured output (#5715) (#5741) chore (ai): remove provider re-exports (#5734) chore (provider): extract shared provider options and metadata (spec) (#5733) fix(ai/core): properly handle custom separator in provider registry (#5713) (#5732) chore (providers/xai): update grok-3 model aliases (#5646) chore(embedding-model-v2): rename rawResponse to response (#5699) chore(providers/mistral): convert to providerOptions (#5675) chore: refactor file towards source pattern (spec) (#5709) ...
jacobkerber
pushed a commit
to jacobkerber/ai
that referenced
this pull request
Jul 15, 2025
…ercel#5713) Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
jacobkerber
pushed a commit
to jacobkerber/ai
that referenced
this pull request
Jul 15, 2025
…ercel#5713) Co-authored-by: Lars Grammel <lars.grammel@gmail.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.
closes #5712
Background
The docs provide the following example that does not work
When I try to use this, I get
NoSuchModelError [AI_NoSuchModelError]: No such languageModel: > gpt-4oSummary
The issue was that we only handled custom separators with a length of 1 character. I updated the code to accommodate any character length, as demonstrated in the documentation.
Tasks
pnpm prettier-fixto fix any formatting issuesFuture Work