lex-llm-anthropic 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1237cef4710e768a52ab02e062379ed70a6f2ee7456cca1b5a45cfb03489c5c4
|
|
4
|
+
data.tar.gz: bb9a132592136f7c64c4f982a6d1f9896348e0362da9d46d77fb846566b6a2d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e138f44cbb23a70c48dc489e53bc6dff5fef7964db248b41f519b37a71e839dee7aa2dcbc26ce7cc5aa41e3df5720c0889537c497b6fb25bfb31053864d0066
|
|
7
|
+
data.tar.gz: 725a59b156f68280cbc9d276eccb6c90e21c638900dbf6d81405588a15bd0ce00c3413555c311aef411162669b959635e9f3d4363fcd124d364eedf8725ef189
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.11 - 2026-05-21
|
|
4
|
+
|
|
5
|
+
- Add `api_version` and `default_max_tokens` to default_settings
|
|
6
|
+
- api_base and anthropic-version read from settings fallback
|
|
7
|
+
- max_tokens reads from settings[:default_max_tokens]
|
|
8
|
+
- Identity headers included via base provider
|
|
9
|
+
|
|
10
|
+
|
|
3
11
|
## 0.2.10 - 2026-05-18
|
|
4
12
|
|
|
5
13
|
- Fix streaming tool call input accumulation: `build_chunk` now handles both `content_block_start` (tool_use with id+name) and `input_json_delta` (partial argument fragments) events. Previously only the start event was parsed, resulting in tool calls with empty arguments.
|
|
@@ -35,15 +35,19 @@ module Legion
|
|
|
35
35
|
def embeddings?(_model) = false
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
def settings
|
|
39
|
+
Anthropic.default_settings
|
|
40
|
+
end
|
|
41
|
+
|
|
38
42
|
def api_base
|
|
39
|
-
config.anthropic_api_base || 'https://api.anthropic.com'
|
|
43
|
+
config.anthropic_api_base || settings[:endpoint] || 'https://api.anthropic.com'
|
|
40
44
|
end
|
|
41
45
|
|
|
42
46
|
def headers
|
|
43
|
-
{
|
|
47
|
+
identity_headers.merge({
|
|
44
48
|
'x-api-key' => config.anthropic_api_key,
|
|
45
|
-
'anthropic-version' => config.anthropic_version || '2023-06-01'
|
|
46
|
-
}.compact
|
|
49
|
+
'anthropic-version' => config.anthropic_version || settings[:api_version] || '2023-06-01'
|
|
50
|
+
}.compact)
|
|
47
51
|
end
|
|
48
52
|
|
|
49
53
|
def completion_url = '/v1/messages'
|
|
@@ -82,7 +86,7 @@ module Legion
|
|
|
82
86
|
model: model.id,
|
|
83
87
|
messages: format_messages(chat_messages, thinking: thinking_enabled?(thinking)),
|
|
84
88
|
stream: stream,
|
|
85
|
-
max_tokens: model.max_tokens || 4096,
|
|
89
|
+
max_tokens: model.max_tokens || settings[:default_max_tokens] || 4096,
|
|
86
90
|
system: system_content(system_messages),
|
|
87
91
|
thinking: thinking_payload(thinking),
|
|
88
92
|
temperature: temperature,
|
|
@@ -24,6 +24,8 @@ module Legion
|
|
|
24
24
|
instance: {
|
|
25
25
|
default_model: 'claude-sonnet-4-6',
|
|
26
26
|
endpoint: 'https://api.anthropic.com',
|
|
27
|
+
api_version: '2023-06-01',
|
|
28
|
+
default_max_tokens: 4096,
|
|
27
29
|
tier: :frontier,
|
|
28
30
|
transport: :http,
|
|
29
31
|
credentials: { api_key: 'env://ANTHROPIC_API_KEY' },
|