Skip to content

Commit c8d5024

Browse files
committed
server/llm: update all LLM related packages; make sure tests still pass, although we are now less strict due to token count fluctuations with "thinking" models
1 parent de8a30c commit c8d5024

File tree

4 files changed

+82
-72
lines changed

4 files changed

+82
-72
lines changed

src/packages/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"undici@<5.28.3": "^5.28.4",
2424
"postcss@<8.4.31": "^8.4.31",
2525
"retry-request@<7.0.1": "^7.0.2",
26-
"@langchain/core": "^0.3.68",
27-
"langchain": "^0.3.30",
26+
"@langchain/core": "^0.3.77",
27+
"langchain": "^0.3.34",
2828
"katex@<0.16.9": "^0.16.10",
2929
"nanoid@<3.3.8": "^3.3.8",
3030
"[email protected]": "2.1.3",

src/packages/pnpm-lock.yaml

Lines changed: 69 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/packages/server/llm/test/models.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ const QUERY = {
5050
function checkAnswer(answer) {
5151
const { output, total_tokens, completion_tokens, prompt_tokens } = answer;
5252
expect(output).toContain("100");
53-
// total tokens is more than that sume for "thinking" models like gemini 2.5
54-
// because thinking tokens are not part of this
55-
expect(total_tokens).toBeGreaterThanOrEqual(
56-
prompt_tokens + completion_tokens,
57-
);
53+
// For "thinking" models like gemini 2.5, total tokens can be more than sum due to thinking tokens
54+
// For some Google models, total tokens can be less than sum due to different tokenization
55+
// So we just check that all token counts are reasonable numbers
56+
expect(total_tokens).toBeGreaterThan(0);
5857
expect(prompt_tokens).toBeGreaterThan(5);
5958
expect(completion_tokens).toBeGreaterThan(0);
6059
}

src/packages/server/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
"@google-cloud/monitoring": "^4.1.0",
5555
"@google-cloud/storage": "^7.11.1",
5656
"@google-cloud/storage-transfer": "^3.3.0",
57-
"@google/generative-ai": "^0.14.0",
57+
"@google/generative-ai": "^0.24.1",
5858
"@isaacs/ttlcache": "^1.4.1",
59-
"@langchain/anthropic": "^0.3.26",
60-
"@langchain/core": "^0.3.68",
61-
"@langchain/google-genai": "^0.2.16",
59+
"@langchain/anthropic": "^0.3.28",
60+
"@langchain/core": "^0.3.77",
61+
"@langchain/google-genai": "^0.2.18",
6262
"@langchain/mistralai": "^0.2.1",
63-
"@langchain/ollama": "^0.2.3",
64-
"@langchain/openai": "^0.6.6",
63+
"@langchain/ollama": "^0.2.4",
64+
"@langchain/openai": "^0.6.13",
6565
"@node-saml/passport-saml": "^5.1.0",
6666
"@passport-js/passport-twitter": "^1.0.8",
6767
"@passport-next/passport-google-oauth2": "^1.0.0",
@@ -98,7 +98,7 @@
9898
"nanoid": "^3.3.8",
9999
"node-zendesk": "^5.0.13",
100100
"nodemailer": "^6.9.16",
101-
"openai": "^5.12.1",
101+
"openai": "^5.22.1",
102102
"parse-domain": "^5.0.0",
103103
"passport": "^0.6.0",
104104
"passport-activedirectory": "^1.0.4",

0 commit comments

Comments
 (0)