Clean up OpenRouterService

This commit is contained in:
2026-04-10 08:19:24 -06:00
parent 973ee4c1d0
commit 588ddd7fec

View File

@@ -45,8 +45,6 @@ public class OpenRouterService {
.uri(URI.create(OPENROUTER_URL))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + apiKey)
.header("HTTP-Referer", "https://petshop.local")
.header("X-Title", "Leon's Pet Store AI Assistant")
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.timeout(Duration.ofSeconds(60))
.build();
@@ -63,12 +61,7 @@ public class OpenRouterService {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("AI request was interrupted", e);
}
catch (RuntimeException e) {
throw e;
}
}
catch (Exception e) {
throw new RuntimeException("Failed to call OpenRouter API: " + e.getMessage(), e);
}