Changeset 0.31.2 (#205)
This commit is contained in:
@@ -78,8 +78,14 @@
|
||||
try {
|
||||
var evt = JSON.parse(raw);
|
||||
// Handler emits OpenAI-format: choices[0].delta.content
|
||||
if (evt.choices && evt.choices[0] && evt.choices[0].delta && evt.choices[0].delta.content) {
|
||||
content += evt.choices[0].delta.content;
|
||||
// v0.31.2: Also capture reasoning_content (DeepSeek, etc.)
|
||||
if (evt.choices && evt.choices[0] && evt.choices[0].delta) {
|
||||
if (evt.choices[0].delta.content) {
|
||||
content += evt.choices[0].delta.content;
|
||||
}
|
||||
if (evt.choices[0].delta.reasoning_content) {
|
||||
content += evt.choices[0].delta.reasoning_content;
|
||||
}
|
||||
} else if (evt.content) {
|
||||
content += evt.content; // fallback for non-OpenAI format
|
||||
}
|
||||
@@ -99,6 +105,8 @@
|
||||
T.pickCheapestChat = function (models) {
|
||||
var skipPatterns = ['embed', 'image', 'dall-e', 'tts', 'whisper', 'moderation'];
|
||||
var chatModels = models.filter(function (m) {
|
||||
// v0.31.2: Skip E2EE models — require client-side decryption we don't support
|
||||
if (m.supportsE2EE || m.supports_e2ee) return false;
|
||||
var t = m.model_type || m.type || '';
|
||||
if (t === 'embedding' || t === 'image') return false;
|
||||
// When type is missing, exclude by model ID pattern
|
||||
|
||||
Reference in New Issue
Block a user