chore(provider): limit forced none thinking to official api#153
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes DeepSeek “official endpoint” helpers into src/endpoint.ts and scopes the “force thinking=none for helper/internal requests” behavior so it only applies when using the official DeepSeek API, preserving user-configured thinking effort for custom/third-party endpoints.
Changes:
- Added
src/endpoint.tsto hostisOfficialDeepSeekBaseUrl/normalizeBaseUrland the official host constant. - Updated provider request preparation to only force
thinking=nonefor helper requests when targeting the official DeepSeek base URL. - Rewired pricing and error-handling code to use the centralized endpoint helpers and removed the duplicated official-host constant.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/provider/request.ts | Restricts forced none-thinking behavior to the official API (and refactors baseUrl handling). |
| src/provider/pricing/currency.ts | Switches to centralized endpoint helpers and removes local duplicates. |
| src/endpoint.ts | New shared utilities/constants for normalizing and recognizing official endpoints. |
| src/client/error/index.ts | Uses the centralized official-endpoint detection for provider identification. |
| src/client/consts.ts | Removes the official host constant now owned by src/endpoint.ts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Verification