Skip to content

请支持openrouter的deepseek-r1的推理过程 #100

@Marstheway

Description

@Marstheway

以下是调试记录:

向simple-one-api代理节点发送请求...
URL: https://api.234234.top
Headers: {'Authorization': 'Bearer 234234234', 'Content-Type': 'application/json'}
Body:
{
"model": "deepseek/deepseek-r1:free",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}

simple-one-api响应的消息如下:

Status code: 200
Headers: {'Alt-Svc': 'h3=":443"; ma=2592000', 'Content-Length': '640', 'Content-Type': 'application/json; charset=utf-8', 'Date': 'Mon, 10 Feb 2025 02:18:49 GMT', 'Server': 'Caddy'}
Body:
{
"id": "gen-1739153920-ZIb21PVoY1nwiXI78cL0",
"object": "chat.completion",
"created": 1739153920,
"model": "deepseek/deepseek-r1:free",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Okay, the user greeted me with "Hello!" So, I need to respond in a friendly and welcoming manner. Let's keep it simple and open-ended to invite further conversation. I should make sure to express willingness to help with whatever they need. Remember to maintain a casual and approachable tone.\nHello! How can I assist you today? \ud83d\ude0a"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 7,
"completion_tokens": 74,
"total_tokens": 81
}
}

如上,simple-one-api好像没有正确处理openrouter的cot推理消息格式,没有在content中添加"think”标签

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions