添加doubao-seed-2-0-code
This commit is contained in:
+38
-27
@@ -84,19 +84,6 @@ model_list:
|
|||||||
extra_headers:
|
extra_headers:
|
||||||
Connection: "close"
|
Connection: "close"
|
||||||
|
|
||||||
# doubao-seed-2-0-pro 强制中等思考,用作回退
|
|
||||||
- model_name: doubao-seed-2-0-pro-medium
|
|
||||||
litellm_params:
|
|
||||||
<<: *token_pricing
|
|
||||||
model: volcengine/doubao-seed-2-0-pro-260215
|
|
||||||
api_base: os.environ/HUOSHAN_BASE_URL
|
|
||||||
api_key: os.environ/HUOSHAN_API_KEY
|
|
||||||
timeout: 1800
|
|
||||||
drop_params: true
|
|
||||||
extra_headers:
|
|
||||||
Connection: "close"
|
|
||||||
extra_body:
|
|
||||||
reasoning_effort: "medium"
|
|
||||||
|
|
||||||
- model_name: doubao-seed-2-0-lite
|
- model_name: doubao-seed-2-0-lite
|
||||||
litellm_params:
|
litellm_params:
|
||||||
@@ -108,6 +95,30 @@ model_list:
|
|||||||
extra_headers:
|
extra_headers:
|
||||||
Connection: "close"
|
Connection: "close"
|
||||||
|
|
||||||
|
- model_name: doubao-seed-2-0-code
|
||||||
|
litellm_params:
|
||||||
|
<<: *token_pricing
|
||||||
|
model: volcengine/doubao-seed-2-0-code-preview-260215
|
||||||
|
api_base: os.environ/HUOSHAN_BASE_URL
|
||||||
|
api_key: os.environ/HUOSHAN_API_KEY
|
||||||
|
drop_params: true
|
||||||
|
extra_headers:
|
||||||
|
Connection: "close"
|
||||||
|
|
||||||
|
# doubao-seed-2-0-code 强制中等思考,用作回退
|
||||||
|
- model_name: doubao-seed-2-0-code-medium
|
||||||
|
litellm_params:
|
||||||
|
<<: *token_pricing
|
||||||
|
model: volcengine/doubao-seed-2-0-code-preview-260215
|
||||||
|
api_base: os.environ/HUOSHAN_BASE_URL
|
||||||
|
api_key: os.environ/HUOSHAN_API_KEY
|
||||||
|
timeout: 1800
|
||||||
|
drop_params: true
|
||||||
|
extra_headers:
|
||||||
|
Connection: "close"
|
||||||
|
extra_body:
|
||||||
|
reasoning_effort: "medium"
|
||||||
|
|
||||||
# - model_name: glm-4.7
|
# - model_name: glm-4.7
|
||||||
# litellm_params:
|
# litellm_params:
|
||||||
# <<: *token_pricing
|
# <<: *token_pricing
|
||||||
@@ -145,19 +156,19 @@ model_list:
|
|||||||
extra_body:
|
extra_body:
|
||||||
reasoning_effort: "minimal"
|
reasoning_effort: "minimal"
|
||||||
|
|
||||||
- model_name: fanyi
|
# - model_name: fanyi
|
||||||
litellm_params:
|
# litellm_params:
|
||||||
<<: *token_pricing
|
# <<: *token_pricing
|
||||||
model: volcengine/doubao-seed-2-0-lite-260215
|
# model: volcengine/doubao-seed-2-0-lite-260215
|
||||||
api_base: os.environ/HUOSHAN_BASE_URL
|
# api_base: os.environ/HUOSHAN_BASE_URL
|
||||||
api_key: os.environ/HUOSHAN_API_KEY
|
# api_key: os.environ/HUOSHAN_API_KEY
|
||||||
timeout: 120
|
# timeout: 120
|
||||||
stream: false
|
# stream: false
|
||||||
drop_params: true
|
# drop_params: true
|
||||||
extra_headers:
|
# extra_headers:
|
||||||
Connection: "close"
|
# Connection: "close"
|
||||||
extra_body:
|
# extra_body:
|
||||||
reasoning_effort: "minimal"
|
# reasoning_effort: "minimal"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -171,7 +182,7 @@ litellm_settings:
|
|||||||
# fallbacks: [
|
# fallbacks: [
|
||||||
# {"gemini-2.5-flash": ["gemini-2.5-pro"]}
|
# {"gemini-2.5-flash": ["gemini-2.5-pro"]}
|
||||||
# ]
|
# ]
|
||||||
default_fallbacks: ["doubao-seed-2-0-pro-medium"]
|
default_fallbacks: ["doubao-seed-2-0-code-medium"]
|
||||||
request_timeout: 120 # raise Timeout error if call takes longer than 10s. Sets litellm.request_timeout
|
request_timeout: 120 # raise Timeout error if call takes longer than 10s. Sets litellm.request_timeout
|
||||||
cache: False # 开启缓存
|
cache: False # 开启缓存
|
||||||
# cache_params:
|
# cache_params:
|
||||||
|
|||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
import json
|
||||||
|
import re
|
||||||
|
|
||||||
|
transcript_path = r"C:\Users\Kimber Xu\.gemini\antigravity-ide\brain\ef230fd3-39a1-47f8-aa16-4969fb505243\.system_generated\logs\transcript.jsonl"
|
||||||
|
file_path = r"d:\PyCharm_projects\litellm-config\volc_limit_sync.py"
|
||||||
|
|
||||||
|
lines_dict = {}
|
||||||
|
|
||||||
|
with open(transcript_path, "r", encoding="utf-8") as f:
|
||||||
|
for line in f:
|
||||||
|
try:
|
||||||
|
step = json.loads(line)
|
||||||
|
if step.get("type") == "SYSTEM_RESPONSE":
|
||||||
|
content = step.get("content", "")
|
||||||
|
if "File Path: `file:///d:/PyCharm_projects/litellm-config/volc_limit_sync.py`" in content:
|
||||||
|
# Extract lines
|
||||||
|
for match in re.finditer(r"^(\d+):\s(.*)$", content, re.MULTILINE):
|
||||||
|
line_num = int(match.group(1))
|
||||||
|
line_text = match.group(2)
|
||||||
|
lines_dict[line_num] = line_text
|
||||||
|
except Exception as e:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if lines_dict:
|
||||||
|
max_line = max(lines_dict.keys())
|
||||||
|
with open(file_path, "w", encoding="utf-8") as f:
|
||||||
|
for i in range(1, max_line + 1):
|
||||||
|
if i in lines_dict:
|
||||||
|
f.write(lines_dict[i] + "\n")
|
||||||
|
else:
|
||||||
|
f.write("\n")
|
||||||
|
print(f"Recovered {max_line} lines to {file_path}")
|
||||||
|
else:
|
||||||
|
print("Failed to find lines in transcript.")
|
||||||
Reference in New Issue
Block a user