Skip to content

Commit 5a31963

Browse files
committed
test fix and small rfk [skip ci]
1 parent e97c8ee commit 5a31963

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

compute/src/node/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl DriaComputeNode {
4444
if let Ok(steps) = get_steps(&self.config.address).await {
4545
let earned = steps.score - self.initial_steps;
4646
diagnostics.push(format!(
47-
"Steps: {} total, {} earned in this run, within top {}%",
47+
"$DRIA Points: {} total, {} earned in this run, within top {}%",
4848
steps.score, earned, steps.percentile
4949
));
5050
}

workflows/src/providers/openrouter.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ impl OpenRouterConfig {
7373
.post("https://openrouter.ai/api/v1/chat/completions")
7474
.header("Authorization", format!("Bearer {}", api_key))
7575
.header("Content-Type", "application/json")
76+
.header("HTTP_Referer", "https://dria.co/")
77+
.header("X-Title", "dria")
7678
.body(
7779
serde_json::json!({
7880
"model": model.to_string(),
@@ -115,21 +117,21 @@ mod tests {
115117

116118
#[tokio::test]
117119
#[ignore = "requires OpenRouter API key"]
118-
async fn test_openai_check() {
120+
async fn test_openrouter_check() {
119121
let _ = dotenvy::dotenv(); // read api key
120122
assert!(env::var(ENV_VAR_NAME).is_ok(), "should have api key");
121123
env::set_var("RUST_LOG", "none,dkn_workflows=debug");
122124
let _ = env_logger::builder().is_test(true).try_init();
123125

124-
let models = vec![Model::GPT4Turbo, Model::GPT4o, Model::GPT4oMini];
126+
let models = vec![Model::ORDeepSeek2_5, Model::ORLlama3_1_8B];
125127
let config = OpenRouterConfig::new();
126-
let res = config.check(models.clone()).await;
127-
assert_eq!(res.unwrap(), models);
128+
let res = config.check(models.clone()).await.unwrap();
129+
assert_eq!(res, models);
128130

129131
env::set_var(ENV_VAR_NAME, "i-dont-work");
130132
let config = OpenRouterConfig::new();
131-
let res = config.check(vec![]).await;
132-
assert!(res.is_err());
133+
let res = config.check(vec![]).await.unwrap();
134+
assert!(res.is_empty()); // does not return an Err unlike others!
133135

134136
env::remove_var(ENV_VAR_NAME);
135137
let config = OpenRouterConfig::new();

0 commit comments

Comments
 (0)