move formats/openai.rs into goose-providers crate, along with several dependencies (#9633)
This commit is contained in:
@@ -3,8 +3,8 @@ use console::style;
|
||||
use goose::config::paths::Paths;
|
||||
use goose::config::Config;
|
||||
use goose::conversation::message::Message;
|
||||
use goose::providers::errors::ProviderError;
|
||||
use goose::session::session_manager::{DB_NAME, SESSIONS_FOLDER};
|
||||
use goose_providers::errors::ProviderError;
|
||||
use serde_yaml;
|
||||
use std::time::Duration;
|
||||
|
||||
|
||||
@@ -2091,11 +2091,11 @@ fn handle_agent_error(e: &anyhow::Error, is_stream_json_mode: bool) {
|
||||
});
|
||||
}
|
||||
|
||||
if e.downcast_ref::<goose::providers::errors::ProviderError>()
|
||||
if e.downcast_ref::<goose_providers::errors::ProviderError>()
|
||||
.map(|provider_error| {
|
||||
matches!(
|
||||
provider_error,
|
||||
goose::providers::errors::ProviderError::ContextLengthExceeded(_)
|
||||
goose_providers::errors::ProviderError::ContextLengthExceeded(_)
|
||||
)
|
||||
})
|
||||
.unwrap_or(false)
|
||||
@@ -2366,7 +2366,7 @@ mod tests {
|
||||
assert_eq!(current.model_name, "gpt-5.4");
|
||||
assert_eq!(
|
||||
current.thinking_effort(),
|
||||
Some(goose::model::ThinkingEffort::High)
|
||||
Some(goose_providers::thinking::ThinkingEffort::High)
|
||||
);
|
||||
|
||||
let switched = build_switched_model_config("openai", "gpt-5.4", ¤t).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user