Skip to content

Commit f944655

Browse files
committed
feat: Update role hierarchy and subscription tier configurations
- Refactored role hierarchy to align with Supabase Auth and RLS, simplifying role definitions and inheritance. - Introduced new roles: 'service_role', 'moderator', and updated existing roles to streamline access control. - Revised subscription tiers to include 'free', 'pro', and 'enterprise' with clear inheritance and access levels. - Added RLS policy helpers for better role-based access control. refactor: Enhance tracing configuration - Removed unused imports and cleaned up code formatting for better readability. - Improved error handling and logging in the LangfuseExporter class. feat: Implement AI Gateway configuration - Created a new AI Gateway configuration file to manage API interactions with various AI models. - Added support for multiple AI models from different providers, including OpenAI, Anthropic, Google, and others. - Implemented dynamic model discovery and credit retrieval functions. feat: Add Claude Code provider integration - Introduced a new configuration for Claude Code provider, allowing interaction with Claude models. - Defined model selection functions for easy access to different Claude Code models. feat: Integrate GitHub Copilot provider - Developed a configuration for GitHub Copilot integration, supporting various models. - Added environment variable management for flexible configuration. - Created model selection function for easy access to GitHub Copilot models.
1 parent a9910d7 commit f944655

19 files changed

Lines changed: 1636 additions & 977 deletions

.agent/rules/conventions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import type { InferUITool} from "@mastra/core/tools";
1919
import { createTool } from "@mastra/core/tools";
2020
import { z } from "zod";
2121
import { AISpanType, InternalSpans } from "@mastra/core/ai-tracing";
22-
import type { RuntimeContext } from "@mastra/core/runtime-context";
2322
import { log } from "../config/logger";
2423
import type { RuntimeContext } from '@mastra/core/runtime-context'
2524
import type { TracingContext } from '@mastra/core/ai-tracing';

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ ANTHROPIC_API_KEY='your_anthropic_api_key_here'
2020
# OpenRouter Configuration
2121
OPENROUTER_API_KEY='your_openrouter_api_key_here'
2222

23+
# AI Ga
24+
AI_GATEWAY_API_KEY='your_api_key_here'
25+
2326
# Langfuse Configuration (optional, for monitoring and logging)
2427
# Get your keys from https://langfuse.com
2528
LANGFUSE_SECRET_KEY="sk-lf-your_secret_key_here"

app/chat/config/openrouter-models.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,14 @@ export const OPENROUTER_MODELS: ModelConfig[] = [
293293
},
294294

295295
// OpenAI via OpenRouter
296+
{
297+
id: "openrouter/openai/gpt-oss-20b:free",
298+
name: "GPT OSS 20B (Free)",
299+
provider: "openrouter",
300+
contextWindow: 8000,
301+
capabilities: ["chat", "code"],
302+
description: "Open-source GPT via OR",
303+
},
296304
{
297305
id: "openrouter/openai/gpt-4.1",
298306
name: "GPT-4.1 (OR)",

0 commit comments

Comments
 (0)