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:
@@ -10,11 +10,10 @@ use std::path::Path;
|
||||
|
||||
use anyhow::{Context, bail};
|
||||
use devcontainer_rs::{ExecOutput, normalize};
|
||||
use openrouter_rs::types::Tool;
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use super::Sandbox;
|
||||
use crate::gitea::WebhookType;
|
||||
use crate::{gitea::WebhookType, open_router::Tool};
|
||||
|
||||
/// Tools available to the model for a given webhook action.
|
||||
///
|
||||
@@ -216,7 +215,6 @@ mod tests {
|
||||
WebhookType::Review(ReviewPayload {
|
||||
action: "created".to_string(),
|
||||
pull_request: PullRequest {
|
||||
diff_url: "https://example.com/diff".to_string(),
|
||||
number: 1,
|
||||
title: "My PR".to_string(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user