Skip to content

Conversation

@pan93412
Copy link
Member

  • fix(chat): increase timeout to 300s
  • fix(chat): switch to Haiku 4.5
  • refactor(chat): prune context
  • chore: update schema

@pan93412 pan93412 self-assigned this Oct 29, 2025
@linear
Copy link

linear bot commented Oct 29, 2025

DBP-128 降低 AI 成本

@vercel
Copy link
Contributor

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
dbplay-app Ready Ready Preview Comment Oct 29, 2025 5:14pm

@pan93412 pan93412 requested a review from Copilot October 29, 2025 17:06
Copy link
Contributor

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 introduces a new Point creation mutation to the GraphQL API, updates comment translations from Chinese to English for question statistics, and optimizes the AI chat API by implementing message pruning and switching to a more cost-effective model.

  • Added createPoint mutation with corresponding input type for creating user point records
  • Translated Chinese comments to English in QuestionStatistics type
  • Optimized chat API with message pruning and reduced AI model token budget

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
schema.graphql Added CreatePointInput type and createPoint mutation; translated QuestionStatistics comments to English
gql/graphql.ts Generated TypeScript types corresponding to schema changes
app/api/chat/route.ts Added message pruning, switched from claude-sonnet-4-5 to claude-haiku-4-5, reduced thinking token budget, removed maxDuration export

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pan93412 pan93412 merged commit 2fbb423 into main Oct 29, 2025
3 checks passed
@pan93412 pan93412 deleted the pan93412/dbp-128-降低-ai-成本 branch October 29, 2025 17:15
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