Skip to content

Commit 21b634a

Browse files
committed
fix: change top_p from 0 to 0.1 for DeepSeek API compatibility
DeepSeek's OpenAI-compatible API rejects top_p=0 with: 'Invalid top_p value, the valid range of top_p is (0, 1.0]' top_p=0.1 is the closest valid value that preserves near-deterministic behavior while satisfying the API constraint.
1 parent 3045a44 commit 21b634a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/community/openai/model-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class OpenAIModelProvider implements ModelProvider {
9393
messages: convertToOpenAIMessages(messages),
9494
tools: tools ? convertToOpenAITools(tools) : undefined,
9595
temperature: 0,
96-
top_p: 0,
96+
top_p: 0.1,
9797
...options,
9898
};
9999
}

0 commit comments

Comments
 (0)