mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 08:56:22 +02:00
fix api urls
This commit is contained in:
parent
7311501343
commit
8f1adfb6a5
2 changed files with 5 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
export const ROWBOAT_AI_GATEWAY_BASE_URL =
|
||||
process.env.ROWBOAT_AI_GATEWAY_BASE_URL || 'http://localhost:3002/v1';
|
||||
export const API_URL =
|
||||
process.env.API_URL || 'http://localhost:3002/v1';
|
||||
|
||||
export const SUPABASE_PROJECT_URL =
|
||||
process.env.SUPABASE_PROJECT_URL || 'http://127.0.0.1:54321';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { IOAuthRepo } from '../auth/repo.js';
|
|||
import { IClientRegistrationRepo } from '../auth/client-repo.js';
|
||||
import { getProviderConfig } from '../auth/providers.js';
|
||||
import * as oauthClient from '../auth/oauth-client.js';
|
||||
import { ROWBOAT_AI_GATEWAY_BASE_URL } from '../config/env.js';
|
||||
import { API_URL } from '../config/env.js';
|
||||
|
||||
async function getAccessToken(): Promise<string> {
|
||||
const oauthRepo = container.resolve<IOAuthRepo>('oauthRepo');
|
||||
|
|
@ -51,7 +51,7 @@ async function getAccessToken(): Promise<string> {
|
|||
export async function getGatewayProvider(): Promise<ProviderV2> {
|
||||
const accessToken = await getAccessToken();
|
||||
return createOpenRouter({
|
||||
baseURL: ROWBOAT_AI_GATEWAY_BASE_URL,
|
||||
baseURL: `${API_URL}/v1/llm`,
|
||||
apiKey: accessToken,
|
||||
});
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ type ProviderSummary = {
|
|||
|
||||
export async function listGatewayModels(): Promise<{ providers: ProviderSummary[] }> {
|
||||
const accessToken = await getAccessToken();
|
||||
const response = await fetch(`${ROWBOAT_AI_GATEWAY_BASE_URL}/models`, {
|
||||
const response = await fetch(`${API_URL}/v1/llm/models`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` },
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue