agentsclimarketplace

Bx ai models

Skill ortus-boxlang/skills/boxlang-modules/bx-ai/bx-ai-models

BoxLang AI skills repository and Claude Plugin

Install
npx -y skills add ortus-boxlang/skills --skill bx-ai-models

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use this skill when configuring AI models with aiModel(): selecting providers, setting default parameters, structured output schemas, working with the service BIF aiService(), and pre-configuring providers in module settings.

SKILL.md

3.4 KB, as published. Nobody here has run it

bx-ai: Models & Providers

aiModel() BIF

// Signature
aiModel( provider="", params={}, apiKey="" )

Returns a reusable model object used in pipelines, agents, and direct calls.

// Basic — uses default provider from module config
model = aiModel()

// Specific provider
model = aiModel( provider: "openai" )
model = aiModel( provider: "claude" )
model = aiModel( provider: "gemini" )
model = aiModel( provider: "ollama" )

// With default parameters (applied to every call on this model)
model = aiModel(
    provider: "openai",
    params  : {
        model      : "gpt-4o",
        temperature: 0.7,
        max_tokens : 2000
    }
)

Available Providers

ProviderKey NameNotes
OpenAIopenaiGPT-4o, GPT-4-turbo, o1, etc.
Anthropic ClaudeclaudeClaude 3.5 Sonnet, Haiku, Opus
Google GeminigeminiGemini 1.5 Pro, Flash
Grok (xAI)grokGrok-2
GroqgroqUltra-fast inference; Llama, Mixtral
DeepSeekdeepseekDeepSeek-R1, DeepSeek-V3
OllamaollamaLocal models — no API key needed
MistralmistralMistral Large, Pixtral
PerplexityperplexityOnline search-augmented

Module-Level Provider Config (Recommended)

Configure providers once in ModuleConfig.bx or boxlang.json rather than repeating API keys in every call:

// ModuleConfig.bx
moduleSettings = {
    "bx-ai": {
        defaultProvider: "openai",
        providers: {
            openai: {
                apiKey: server.system.environment.OPENAI_API_KEY,
                model : "gpt-4o"
            },
            claude: {
                apiKey: server.system.environment.ANTHROPIC_API_KEY,
                model : "claude-3-5-sonnet-20241022"
            }
        }
    }
}

With pre-configured providers you can omit apiKey everywhere:

// No apiKey needed — resolved from module config
result = aiChat( "Hello" )
model  = aiModel( provider: "claude" )
agent  = aiAgent( name: "Bot", model: aiModel( provider: "openai" ) )

aiService() — Service-Level Access

// Get the global AI service
service = aiService()

// List configured providers
providers = service.getProviders()

// Get a specific provider instance
openaiProvider = service.getProvider( "openai" )

// Set the default provider at runtime
service.setDefaultProvider( "claude" )

Switching Models per Call

// Override model on a per-request basis via params
result = aiChat(
    "Complex reasoning task",
    { model: "o1-preview", temperature: 1 },
    { provider: "openai" }
)

// Use a cheaper model for simple tasks
simple = aiChat(
    "Is this email spam? Yes or No.",
    { model: "gpt-4o-mini", temperature: 0.0 },
    { provider: "openai" }
)

Common Pitfalls

  • aiModel( "gpt-4o" ) is WRONG — gpt-4o is a model name, not provider
  • aiModel( provider: "openai", params: { model: "gpt-4o" } ) is correct
  • ❌ Never hardcode API keys in source code — use environment variables
  • ✅ Configure all providers in module settings for centralized management

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.