Ok, well, that got out of hand (#3718)
Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
@@ -255,7 +255,7 @@ async fn update_agent_provider(
|
||||
.get_param("GOOSE_MODEL")
|
||||
.expect("Did not find a model on payload or in env to update provider with")
|
||||
});
|
||||
let model_config = ModelConfig::new(model);
|
||||
let model_config = ModelConfig::new(&model).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?;
|
||||
let new_provider = create(&payload.provider, model_config).unwrap();
|
||||
agent
|
||||
.update_provider(new_provider)
|
||||
|
||||
@@ -441,7 +441,7 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_reply_endpoint() {
|
||||
let mock_model_config = ModelConfig::new("test-model".to_string());
|
||||
let mock_model_config = ModelConfig::new("test-model").unwrap();
|
||||
let mock_provider = Arc::new(MockProvider {
|
||||
model_config: mock_model_config,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user