Compare commits
4 Commits
rust-v0.1.
...
rust-v0.1.
| Author | SHA1 | Date | |
|---|---|---|---|
| ee75cfaa7f | |||
| 085d8c9343 | |||
| 462b219d3f | |||
| 63de226119 |
1392
llmx-rs/Cargo.lock
generated
1392
llmx-rs/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,7 @@ members = [
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
# Track the edition for all workspace crates in one place. Individual
|
# Track the edition for all workspace crates in one place. Individual
|
||||||
# crates can still override this value, but keeping it here means new
|
# crates can still override this value, but keeping it here means new
|
||||||
# crates created with `cargo new -w ...` automatically inherit the 2024
|
# crates created with `cargo new -w ...` automatically inherit the 2024
|
||||||
@@ -191,7 +191,7 @@ tokio-util = "0.7.16"
|
|||||||
toml = "0.9.5"
|
toml = "0.9.5"
|
||||||
toml_edit = "0.23.4"
|
toml_edit = "0.23.4"
|
||||||
tonic = "0.13.1"
|
tonic = "0.13.1"
|
||||||
tracing = "0.1.51"
|
tracing = "0.1.41"
|
||||||
tracing-appender = "0.2.3"
|
tracing-appender = "0.2.3"
|
||||||
tracing-subscriber = "0.3.20"
|
tracing-subscriber = "0.3.20"
|
||||||
tracing-test = "0.2.5"
|
tracing-test = "0.2.5"
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ impl McpProcess {
|
|||||||
client_info: ClientInfo {
|
client_info: ClientInfo {
|
||||||
name: "llmx-app-server-tests".to_string(),
|
name: "llmx-app-server-tests".to_string(),
|
||||||
title: None,
|
title: None,
|
||||||
version: "0.1.5".to_string(),
|
version: "0.1.6".to_string(),
|
||||||
},
|
},
|
||||||
})?);
|
})?);
|
||||||
let req_id = self.send_request("initialize", params).await?;
|
let req_id = self.send_request("initialize", params).await?;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ async fn get_user_agent_returns_current_llmx_user_agent() -> Result<()> {
|
|||||||
|
|
||||||
let os_info = os_info::get();
|
let os_info = os_info::get();
|
||||||
let user_agent = format!(
|
let user_agent = format!(
|
||||||
"llmx_cli_rs/0.1.5 ({} {}; {}) {} (llmx-app-server-tests; 0.1.5)",
|
"llmx_cli_rs/0.1.6 ({} {}; {}) {} (llmx-app-server-tests; 0.1.6)",
|
||||||
os_info.os_type(),
|
os_info.os_type(),
|
||||||
os_info.version(),
|
os_info.version(),
|
||||||
os_info.architecture().unwrap_or("unknown"),
|
os_info.architecture().unwrap_or("unknown"),
|
||||||
|
|||||||
@@ -56,7 +56,12 @@ pub(crate) async fn stream_chat_completions(
|
|||||||
let mut messages = Vec::<serde_json::Value>::new();
|
let mut messages = Vec::<serde_json::Value>::new();
|
||||||
|
|
||||||
let full_instructions = prompt.get_full_instructions(model_family);
|
let full_instructions = prompt.get_full_instructions(model_family);
|
||||||
messages.push(json!({"role": "system", "content": full_instructions}));
|
// Add cache_control to system instructions for Anthropic prompt caching
|
||||||
|
messages.push(json!({
|
||||||
|
"role": "system",
|
||||||
|
"content": full_instructions,
|
||||||
|
"cache_control": {"type": "ephemeral"}
|
||||||
|
}));
|
||||||
|
|
||||||
let input = prompt.get_formatted_input();
|
let input = prompt.get_formatted_input();
|
||||||
|
|
||||||
@@ -413,6 +418,20 @@ pub(crate) async fn stream_chat_completions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
debug!("Built {} messages for API request", messages.len());
|
debug!("Built {} messages for API request", messages.len());
|
||||||
|
|
||||||
|
// Add cache_control to conversation history for Anthropic prompt caching
|
||||||
|
// Add it to a message that's at least 3 messages before the end (stable history)
|
||||||
|
// This caches the earlier conversation while keeping recent turns uncached
|
||||||
|
if messages.len() > 4 {
|
||||||
|
let cache_idx = messages.len().saturating_sub(4);
|
||||||
|
if let Some(msg) = messages.get_mut(cache_idx) {
|
||||||
|
if let Some(obj) = msg.as_object_mut() {
|
||||||
|
obj.insert("cache_control".to_string(), json!({"type": "ephemeral"}));
|
||||||
|
debug!("Added cache_control to message at index {} (conversation history)", cache_idx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
debug!("=== End Chat Completions Request Debug ===");
|
debug!("=== End Chat Completions Request Debug ===");
|
||||||
|
|
||||||
let tools_json = create_tools_json_for_chat_completions_api(&prompt.tools)?;
|
let tools_json = create_tools_json_for_chat_completions_api(&prompt.tools)?;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ impl McpProcess {
|
|||||||
let initialized = self.read_jsonrpc_message().await?;
|
let initialized = self.read_jsonrpc_message().await?;
|
||||||
let os_info = os_info::get();
|
let os_info = os_info::get();
|
||||||
let user_agent = format!(
|
let user_agent = format!(
|
||||||
"llmx_cli_rs/0.1.5 ({} {}; {}) {} (elicitation test; 0.0.0)",
|
"llmx_cli_rs/0.1.6 ({} {}; {}) {} (elicitation test; 0.0.0)",
|
||||||
os_info.os_type(),
|
os_info.os_type(),
|
||||||
os_info.version(),
|
os_info.version(),
|
||||||
os_info.architecture().unwrap_or("unknown"),
|
os_info.architecture().unwrap_or("unknown"),
|
||||||
@@ -163,7 +163,7 @@ impl McpProcess {
|
|||||||
"serverInfo": {
|
"serverInfo": {
|
||||||
"name": "llmx-mcp-server",
|
"name": "llmx-mcp-server",
|
||||||
"title": "LLMX",
|
"title": "LLMX",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"user_agent": user_agent
|
"user_agent": user_agent
|
||||||
},
|
},
|
||||||
"protocolVersion": mcp_types::MCP_SCHEMA_VERSION
|
"protocolVersion": mcp_types::MCP_SCHEMA_VERSION
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ expression: sanitized
|
|||||||
/status
|
/status
|
||||||
|
|
||||||
╭───────────────────────────────────────────────────────────────────────────╮
|
╭───────────────────────────────────────────────────────────────────────────╮
|
||||||
│ >_ LLMX (v0.1.5) │
|
│ >_ LLMX (v0.1.6) │
|
||||||
│ │
|
│ │
|
||||||
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
||||||
│ information on rate limits and credits │
|
│ information on rate limits and credits │
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ expression: sanitized
|
|||||||
/status
|
/status
|
||||||
|
|
||||||
╭─────────────────────────────────────────────────────────────────╮
|
╭─────────────────────────────────────────────────────────────────╮
|
||||||
│ >_ LLMX (v0.1.5) │
|
│ >_ LLMX (v0.1.6) │
|
||||||
│ │
|
│ │
|
||||||
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
||||||
│ information on rate limits and credits │
|
│ information on rate limits and credits │
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ expression: sanitized
|
|||||||
/status
|
/status
|
||||||
|
|
||||||
╭──────────────────────────────────────────────────────────────╮
|
╭──────────────────────────────────────────────────────────────╮
|
||||||
│ >_ LLMX (v0.1.5) │
|
│ >_ LLMX (v0.1.6) │
|
||||||
│ │
|
│ │
|
||||||
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
||||||
│ information on rate limits and credits │
|
│ information on rate limits and credits │
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ expression: sanitized
|
|||||||
/status
|
/status
|
||||||
|
|
||||||
╭──────────────────────────────────────────────────────────────╮
|
╭──────────────────────────────────────────────────────────────╮
|
||||||
│ >_ LLMX (v0.1.5) │
|
│ >_ LLMX (v0.1.6) │
|
||||||
│ │
|
│ │
|
||||||
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
||||||
│ information on rate limits and credits │
|
│ information on rate limits and credits │
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ expression: sanitized
|
|||||||
/status
|
/status
|
||||||
|
|
||||||
╭───────────────────────────────────────────────────────────────────╮
|
╭───────────────────────────────────────────────────────────────────╮
|
||||||
│ >_ LLMX (v0.1.5) │
|
│ >_ LLMX (v0.1.6) │
|
||||||
│ │
|
│ │
|
||||||
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
│ Visit https://chatgpt.com/llmx/settings/usage for up-to-date │
|
||||||
│ information on rate limits and credits │
|
│ information on rate limits and credits │
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ expression: sanitized
|
|||||||
/status
|
/status
|
||||||
|
|
||||||
╭────────────────────────────────────────────╮
|
╭────────────────────────────────────────────╮
|
||||||
│ >_ LLMX (v0.1.5) │
|
│ >_ LLMX (v0.1.6) │
|
||||||
│ │
|
│ │
|
||||||
│ Visit https://chatgpt.com/llmx/settings/ │
|
│ Visit https://chatgpt.com/llmx/settings/ │
|
||||||
│ usage for up-to-date │
|
│ usage for up-to-date │
|
||||||
|
|||||||
10
llmx-rs/tui/tests/fixtures/binary-size-log.jsonl
vendored
10
llmx-rs/tui/tests/fixtures/binary-size-log.jsonl
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user