Skip to content

Conversation

idosal
Copy link
Owner

@idosal idosal commented Apr 25, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 23:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the previous groq-based AI provider with a new workers-ai-provider implementation. Key changes include:

  • Removing the old getModel mechanism and replacing it with createWorkersAI using the CloudflareEnvironment's AI binding.
  • Modifying the model usage in the streamText function by passing the workersai model directly instead of using model.languageModel(selectedModel).
Files not reviewed (2)
  • package.json: Language not supported
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

app/routes/api.chat.ts:48

  • The new workersai function is used to obtain the model, which bypasses the previous call to languageModel(selectedModel). Please verify that the model object returned has the correct interface required by streamText.
const model = workersai("@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", {});

app/routes/api.chat.ts:70

  • Since the prior implementation invoked model.languageModel(selectedModel) to select the appropriate model, ensure that passing the model object directly meets the expected interface for streamText.
model: 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.

1 participant