Skip to content

test (ai): use mock-provider instead of openai to match used MockImageModelV2#6132

Merged
gr2m merged 1 commit intov5from
v5-gr2m/use-mock-provider-in-generate-image-test
May 4, 2025
Merged

test (ai): use mock-provider instead of openai to match used MockImageModelV2#6132
gr2m merged 1 commit intov5from
v5-gr2m/use-mock-provider-in-generate-image-test

Conversation

@gr2m
Copy link
Copy Markdown
Collaborator

@gr2m gr2m commented May 3, 2025

Background

Follow up to https://github.com/vercel/ai/pull/6083/files#r2069803342

Summary

packages/ai/core/generate-image/generate-image.test.ts uses MockImageModelV2 which sets provdier to "mock-provider". But the tests use openai as the provider key. This pull request updates the tests to use mock-provider as the provider key to match the used model.

@gr2m gr2m merged commit 8919eff into v5 May 4, 2025
9 checks passed
@gr2m gr2m deleted the v5-gr2m/use-mock-provider-in-generate-image-test branch May 4, 2025 06:37
samdenty pushed a commit that referenced this pull request May 5, 2025
* origin/v5: (23 commits)
  chore (ai): remove StreamData and mergeStreams (#6150)
  chore (build): fix typecheck setup (#6151)
  chore (ai): remove IdGenerator duplication (#6147)
  chore (ai): remove content from ui messages (#6145)
  Version Packages (canary) (#6115)
  feat (provider): support reasoning tokens, cached input tokens, total token in usage information (#6140)
  test (ai): use `mock-provider` instead of `openai` to match used `MockImageModelV2` (#6132)
  fix(providers): always use optional instead of mix of nullish for providerOptions (#6122)
  chore (ai): remove sendExtraMessageFields (#6120)
  chore(provider-utils): move ToolResultContent to provider-utils (#6121)
  feat(embed-many): respect supportsParallelCalls & concurrency (#6108)
  chore (provider-utils): return IdGenerator interface (#6118)
  chore (provider): improve jsdoc comments (#6117)
  chore (ai): remove outdated typecasts (#6116)
  chore (ai): remove useChat keepLastMessageOnError (#6114)
  fix(providers/openai): logprobs for stream alongside completion model (#6091)
  chore (ai): move maxSteps into UseChatOptions (#6113)
  docs (ai): add notes on schema .optional() (#6111)
  chore: update references to use ai-sdk.dev (#6076) (#6107)
  Version Packages (canary) (#6069)
  ...
iteratetograceness pushed a commit to iteratetograceness/ai that referenced this pull request May 9, 2025
…kImageModelV2` (vercel#6132)

## Background

Follow up to https://github.com/vercel/ai/pull/6083/files#r2069803342

## Summary

`packages/ai/core/generate-image/generate-image.test.ts` uses
`MockImageModelV2` which sets `provdier` to `"mock-provider"`. But the
tests use `openai` as the provider key. This pull request updates the
tests to use `mock-provider` as the provider key to match the used
model.
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.

2 participants