Visitar URL original
test(provider): add test coverage for utilityModelId by webdevsamran · Pull Request #44 · charandeep-reddy/agentic-chat · GitHub
Skip to content

test(provider): add test coverage for utilityModelId - #44

Merged
charandeep-reddy merged 1 commit into
charandeep-reddy:mainfrom
webdevsamran:test/utility-model-id-coverage
Aug 19, 2026
Merged

charandeep-reddy merged 1 commit into
charandeep-reddy:mainfrom
webdevsamran:test/utility-model-id-coverage

Conversation

@webdevsamran

Copy link
Copy Markdown
Contributor

Summary

Fixes #40

Problem

\src/lib/provider.ts\ exports \utilityModelId, which was untested. It encodes the rule that only the \custom\ provider routes to \UTILITY_MODEL\ for background operations (such as \generateTitleInBackground), while named providers (Anthropic, OpenAI, Google) reuse the conversation's active chat model.

Fix

  • Added \ ests/provider.test.ts\ to cover \utilityModelId\ behavior across all supported providers (\custom, \�nthropic, \openai, \google).
  • Verified with \�un test tests/provider.test.ts, \�un run typecheck, and \�un run lint.

src/lib/provider.ts exports utilityModelId, which routes the custom provider
to UTILITY_MODEL while preserving the active chatModelId for named providers
(Anthropic, OpenAI, Google) during background tasks like title generation.

Add tests/provider.test.ts to verify this routing behavior across all providers.

Fixes charandeep-reddy#40
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

@webdevsamran is attempting to deploy a commit to the charan Team on Vercel.

A member of the Team first needs to authorize it.

@charandeep-reddy
charandeep-reddy merged commit e5a5597 into charandeep-reddy:main Aug 19, 2026
1 of 2 checks passed
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.

Add tests for utilityModelId (lib/provider.ts)

2 participants