mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:16:17 +00:00
fix: droid转发移除claude code的metadata参数
This commit is contained in:
@@ -16,7 +16,8 @@ const MODEL_REASONING_CONFIG = {
|
|||||||
'claude-sonnet-4-20250514': 'medium',
|
'claude-sonnet-4-20250514': 'medium',
|
||||||
'claude-sonnet-4-5-20250929': 'high',
|
'claude-sonnet-4-5-20250929': 'high',
|
||||||
'gpt-5-2025-08-07': 'high',
|
'gpt-5-2025-08-07': 'high',
|
||||||
'gpt-5-codex': 'off'
|
'gpt-5-codex': 'off',
|
||||||
|
'claude-3-5-haiku-20241022': 'off'
|
||||||
}
|
}
|
||||||
|
|
||||||
const VALID_REASONING_LEVELS = new Set(['low', 'medium', 'high'])
|
const VALID_REASONING_LEVELS = new Set(['low', 'medium', 'high'])
|
||||||
@@ -851,6 +852,10 @@ class DroidRelayService {
|
|||||||
const { disableStreaming = false } = options
|
const { disableStreaming = false } = options
|
||||||
const processedBody = { ...requestBody }
|
const processedBody = { ...requestBody }
|
||||||
|
|
||||||
|
if (processedBody && Object.prototype.hasOwnProperty.call(processedBody, 'metadata')) {
|
||||||
|
delete processedBody.metadata
|
||||||
|
}
|
||||||
|
|
||||||
if (disableStreaming) {
|
if (disableStreaming) {
|
||||||
if ('stream' in processedBody) {
|
if ('stream' in processedBody) {
|
||||||
delete processedBody.stream
|
delete processedBody.stream
|
||||||
|
|||||||
Reference in New Issue
Block a user