-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat:model-specific-configuration #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
config Add in a new ModelConfig struct, as well as a trait ProviderModelConfig which should be implemented on each Provider to propgate up model specific configuration when used by the main agent.rs loop. ModelConfig adds the context_limit variable and moves the name, temperature and max_tokens configuration within it. context_limit is set by the following order of precedence, and set at construction time 1. explicit context_limit 2. defaults by model name (see get_model_specific_limit) 3. a global default set to 200_000 Remove the global ESTIMATE_FACTOR, and make it configurable per model Add configuration via goose-cli profiles, verify goose-server environment variable based configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 17 changed files in this pull request and generated no comments.
Files not reviewed (12)
- crates/goose-cli/src/commands/configure.rs: Evaluated as low risk
- crates/goose-cli/src/commands/session.rs: Evaluated as low risk
- crates/goose-cli/src/profile.rs: Evaluated as low risk
- crates/goose-cli/src/test_helpers.rs: Evaluated as low risk
- crates/goose-server/src/configuration.rs: Evaluated as low risk
- crates/goose-server/src/routes/reply.rs: Evaluated as low risk
- crates/goose-server/src/state.rs: Evaluated as low risk
- crates/goose/examples/image_tool.rs: Evaluated as low risk
- crates/goose/src/agent.rs: Evaluated as low risk
- crates/goose/src/providers/anthropic.rs: Evaluated as low risk
- crates/goose/src/providers/base.rs: Evaluated as low risk
- crates/goose/src/providers/configs.rs: Evaluated as low risk
Comments suppressed due to low confidence (1)
crates/goose/src/providers/mock.rs:22
- [nitpick] The parameter name model_config is ambiguous. It should be renamed to config to be consistent with the rest of the codebase.
model_config: ModelConfig::new("mock-model".to_string()),
zakiali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There is some overlap with this PR . We should merge the two implementations
cd1067f to
b2de530
Compare
add model specific configuration
This PR adds model specific configuration and updates the
goose-cliandgoose-servercrates to use the updated Provider configuration and handle new configurationchanges
ModelConfigstruct that is composed into eachProviderspecific configcontext_limit+estimate_factor,temperatureandmax_tokenscontext_limithas some defaults for known models set duringModelConfig::new()construction time.an explicitly set limit > default known model limit > DEFAULT_CONTEXT_LIMIT (128_000)ModelConfigstruct and updated relevant uses of the model configurationgoose-cliandgoose-serverto useModelConfigwhen constructingProvidersgoose-cliandgoose-serverto handle the new config parameters following the current approach in each respective crate