Replace openrouter-rs with in-tree client and require sandbox
Remove the openrouter-rs dependency in favor of a minimal in-tree OpenRouter chat-completions client, and drop the BOT_NAME and SANDBOX_ENABLED config options. Reviews now always run inside the sandbox, and the review prompt asks the model to read files with the available tools instead of embedding the diff.
This commit is contained in:
1 parent
ee221b0954
commit
04cc172848
15 files changed
+1301
-740
No files matched your search
@@ -79,15 +79,14 @@ async fn run() -> anyhow::Result<()> {
|
||||
let shutdown = CancellationToken::new();
|
||||
|
||||
let sandbox = SandboxConfig {
|
||||
enabled: config.sandbox_enabled,
|
||||
runtime: devcontainer_rs::ContainerRuntime::new(config.container_runtime.clone()),
|
||||
max_iterations: config.sandbox_max_iterations,
|
||||
};
|
||||
|
||||
if sandbox.enabled && !sandbox.runtime.available().await {
|
||||
if !sandbox.runtime.available().await {
|
||||
warn!(
|
||||
runtime = sandbox.runtime.program(),
|
||||
"Sandbox is enabled but the container runtime is not available"
|
||||
"Container runtime is not available, every review will fail"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -95,7 +94,6 @@ async fn run() -> anyhow::Result<()> {
|
||||
gitea_user.login,
|
||||
gitea_api,
|
||||
open_router_client,
|
||||
reqwest::Client::new(),
|
||||
config.bot_max_concurrent,
|
||||
config.open_router_model.clone(),
|
||||
sandbox,
|
||||
|
||||
Reference in new issue
Block a user