diff options
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/phone-opus/src/mcp/protocol.rs | 2 | ||||
| -rw-r--r-- | crates/phone-opus/src/mcp/service.rs | 8 | ||||
| -rw-r--r-- | crates/phone-opus/tests/mcp_hardening.rs | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/crates/phone-opus/src/mcp/protocol.rs b/crates/phone-opus/src/mcp/protocol.rs index 6662fa9..5cd8313 100644 --- a/crates/phone-opus/src/mcp/protocol.rs +++ b/crates/phone-opus/src/mcp/protocol.rs @@ -12,6 +12,8 @@ pub(crate) const HOST_STATE_ENV: &str = "PHONE_OPUS_MCP_HOST_STATE"; pub(crate) const FORCE_ROLLOUT_ENV: &str = "PHONE_OPUS_MCP_TEST_FORCE_ROLLOUT_KEY"; pub(crate) const WORKER_CRASH_ONCE_ENV: &str = "PHONE_OPUS_MCP_TEST_WORKER_CRASH_ONCE_KEY"; pub(crate) const CLAUDE_BIN_ENV: &str = "PHONE_OPUS_CLAUDE_BIN"; +pub(crate) const CLAUDE_EFFORT: &str = "max"; +pub(crate) const CLAUDE_MODEL: &str = "claude-opus-4-6"; pub(crate) const CLAUDE_TOOLSET: &str = "Bash,Read,Grep,Glob,LS,WebFetch,WebSearch"; pub(crate) const EMPTY_MCP_CONFIG: &str = "{\"mcpServers\":{}}"; diff --git a/crates/phone-opus/src/mcp/service.rs b/crates/phone-opus/src/mcp/service.rs index c57d0db..378ce43 100644 --- a/crates/phone-opus/src/mcp/service.rs +++ b/crates/phone-opus/src/mcp/service.rs @@ -13,7 +13,9 @@ use crate::mcp::fault::{FaultRecord, FaultStage}; use crate::mcp::output::{ ToolOutput, fallback_detailed_tool_output, split_presentation, tool_success, }; -use crate::mcp::protocol::{CLAUDE_BIN_ENV, CLAUDE_TOOLSET, EMPTY_MCP_CONFIG}; +use crate::mcp::protocol::{ + CLAUDE_BIN_ENV, CLAUDE_EFFORT, CLAUDE_MODEL, CLAUDE_TOOLSET, EMPTY_MCP_CONFIG, +}; pub(crate) fn run_worker(generation: u64) -> Result<(), Box<dyn std::error::Error>> { let generation = generation_from_wire(generation); @@ -346,6 +348,10 @@ fn invoke_claude(request: &ConsultRequest) -> Result<ConsultResponse, ConsultInv .arg(EMPTY_MCP_CONFIG) .arg("--disable-slash-commands") .arg("--no-chrome") + .arg("--model") + .arg(CLAUDE_MODEL) + .arg("--effort") + .arg(CLAUDE_EFFORT) .arg("--tools") .arg(CLAUDE_TOOLSET) .arg("--permission-mode") diff --git a/crates/phone-opus/tests/mcp_hardening.rs b/crates/phone-opus/tests/mcp_hardening.rs index bc338ca..918c3c4 100644 --- a/crates/phone-opus/tests/mcp_hardening.rs +++ b/crates/phone-opus/tests/mcp_hardening.rs @@ -257,7 +257,7 @@ fn consult_can_resume_a_prior_session_with_read_only_toolset_and_requested_worki "output_tokens": 5 }, "modelUsage": { - "claude-sonnet-4-6": { + "claude-opus-4-6": { "inputTokens": 10, "outputTokens": 5 } @@ -327,6 +327,10 @@ fn consult_can_resume_a_prior_session_with_read_only_toolset_and_requested_worki assert!(lines.contains(&"{\"mcpServers\":{}}")); assert!(lines.contains(&"--disable-slash-commands")); assert!(lines.contains(&"--no-chrome")); + assert!(lines.contains(&"--model")); + assert!(lines.contains(&"claude-opus-4-6")); + assert!(lines.contains(&"--effort")); + assert!(lines.contains(&"max")); assert!(lines.contains(&"--tools")); assert!(lines.contains(&"Bash,Read,Grep,Glob,LS,WebFetch,WebSearch")); assert!(lines.contains(&"--permission-mode")); |