Skip to content

Support CFORGE_DEFAULT_MODEL env var for configurable default model #10

Description

@ermin-muratovic

Summary

Allow users to configure the default LLM provider and model via environment variables.

Depends on

cognitive-forge #16 — pluggable LLM provider architecture must be implemented first.

Current Behavior

All commands default to OpenRouter + openai/gpt-4o hardcoded in source.

Desired Behavior

# Use Claude directly (no OpenRouter needed)
CFORGE_PROVIDER=claude
ANTHROPIC_API_KEY=sk-ant-...

# Use Ollama locally (zero cost, data stays local)
CFORGE_PROVIDER=ollama
CFORGE_DEFAULT_MODEL=llama3

# Use OpenRouter (current default, unchanged)
CFORGE_PROVIDER=openrouter
OPENROUTER_API_KEY=sk-or-...
CFORGE_DEFAULT_MODEL=openai/gpt-4o

Implementation

After cognitive-forge #16 lands:

  • CFORGE_PROVIDER env var selects the provider (claude/ollama/openrouter/custom)
  • CFORGE_DEFAULT_MODEL selects the model within that provider
  • Provider factory in infrastructure layer resolves the correct LLMClient
  • /model <name> in chat still overrides per-session
  • .env.example updated with all provider options
  • README documents provider configuration

Acceptance Criteria

  • cognitive-forge Add /milestone command to cforge-dev chat #16 merged and available
  • CFORGE_PROVIDER selects provider across all commands
  • CFORGE_DEFAULT_MODEL sets model within provider
  • Falls back to openrouter + gpt-4o if neither set (no breaking change)
  • .env.example updated
  • README documents all provider options

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskTask issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions