Skip to content

Commit

Permalink
clippy, bump output tokens to max 8192
Browse files Browse the repository at this point in the history
  • Loading branch information
salman1993 committed Feb 26, 2025
1 parent e882b97 commit 1dcd4a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/goose-cli/src/session/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub fn render_message(message: &Message) {
println!("Image: [data: {}, type: {}]", image.data, image.mime_type);
}
MessageContent::Thinking(thinking) => {
if let Ok(show_thinking) = std::env::var("GOOSE_CLI_SHOW_THINKING") {
if std::env::var("GOOSE_CLI_SHOW_THINKING").is_ok() {
println!("\n{}", style("Thinking:").dim().italic());
print_markdown(&thinking.thinking, theme);
}
Expand Down
5 changes: 1 addition & 4 deletions crates/goose-server/src/routes/reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ use bytes::Bytes;
use futures::{stream::StreamExt, Stream};
use goose::message::{Message, MessageContent};

use mcp_core::{
content::{self, Content},
role::Role,
};
use mcp_core::{content::Content, role::Role};
use serde::Deserialize;
use serde_json::{json, Value};
use std::{
Expand Down
4 changes: 3 additions & 1 deletion crates/goose/src/providers/formats/anthropic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ pub fn create_request(
return Err(anyhow!("No valid messages to send to Anthropic API"));
}

let max_tokens = model_config.max_tokens.unwrap_or(4096);
// https://docs.anthropic.com/en/docs/about-claude/models/all-models#model-comparison-table
// Claude 3.7 supports max output tokens up to 8192
let max_tokens = model_config.max_tokens.unwrap_or(8192);
let mut payload = json!({
"model": model_config.model_name,
"messages": anthropic_messages,
Expand Down

0 comments on commit 1dcd4a9

Please sign in to comment.