* feat(UI, OpenAI): support OpenAI 4o web search add support for web search citations - refactor: Introduced a new CitationsList component to display citations in MessageContent. - feat: Enhanced message handling to support web search results and annotations from OpenAI. - refactor: Removed the deprecated MessageSearchResults component for cleaner code structure. - refactor: Added utility functions for link conversion and URL extraction from Markdown. * chore: remove debug logging from ProxyManager * revert(OpenAIProvider): streamline reasoning check for stream output handling * chore(OpenAIProvider): correct placement of webSearch in response object * fix(patches): update OpenAI package version and remove patch references - Integrated dayjs for dynamic date formatting in prompts.ts. * feat(Citation, Favicon): enhance OpenAI web search support and citation handling - Improved FallbackFavicon component to cache failed favicon URLs. - Support all web search citation preview - Added support for Hunyuan search model in OpenAIProvider and ApiService. * refactor(provider/AI): move additional search parameters to AI Provider
40 lines
1.5 KiB
Diff
Vendored
40 lines
1.5 KiB
Diff
Vendored
diff --git a/core.js b/core.js
|
|
index ebb071d31cd5a14792b62814df072c5971e83300..31e1062d4a7f2422ffec79cf96a35dbb69fe89cb 100644
|
|
--- a/core.js
|
|
+++ b/core.js
|
|
@@ -157,7 +157,7 @@ class APIClient {
|
|
Accept: 'application/json',
|
|
'Content-Type': 'application/json',
|
|
'User-Agent': this.getUserAgent(),
|
|
- ...getPlatformHeaders(),
|
|
+ // ...getPlatformHeaders(),
|
|
...this.authHeaders(opts),
|
|
};
|
|
}
|
|
diff --git a/core.mjs b/core.mjs
|
|
index 9c1a0264dcd73a85de1cf81df4efab9ce9ee2ab7..33f9f1f237f2eb2667a05dae1a7e3dc916f6bfff 100644
|
|
--- a/core.mjs
|
|
+++ b/core.mjs
|
|
@@ -150,7 +150,7 @@ export class APIClient {
|
|
Accept: 'application/json',
|
|
'Content-Type': 'application/json',
|
|
'User-Agent': this.getUserAgent(),
|
|
- ...getPlatformHeaders(),
|
|
+ // ...getPlatformHeaders(),
|
|
...this.authHeaders(opts),
|
|
};
|
|
}
|
|
diff --git a/error.mjs b/error.mjs
|
|
index 7d19f5578040afa004bc887aab1725e8703d2bac..59ec725b6142299a62798ac4bdedb63ba7d9932c 100644
|
|
--- a/error.mjs
|
|
+++ b/error.mjs
|
|
@@ -36,7 +36,7 @@ export class APIError extends OpenAIError {
|
|
if (!status || !headers) {
|
|
return new APIConnectionError({ message, cause: castToError(errorResponse) });
|
|
}
|
|
- const error = errorResponse?.['error'];
|
|
+ const error = errorResponse?.['error'] || errorResponse;
|
|
if (status === 400) {
|
|
return new BadRequestError(status, error, message, headers);
|
|
}
|