Which Pre-trained Models Are Available for OpenSpec? A Complete Configuration Guide

OpenSpec does not ship with its own language model, but instead integrates with high-reasoning pre-trained models including Codex 5.5, Opus 4.7, Claude Code, and Gemini CLI through a flexible, model-agnostic architecture.

OpenSpec, maintained by Fission-AI, is a specification framework that orchestrates software planning and implementation by delegating reasoning tasks to external large language models. Understanding which pre-trained models are available for OpenSpec and how to configure them allows you to optimize spec generation for your specific workflow requirements.

According to the docs/faq.md file in the Fission-AI/OpenSpec repository, the framework works best with high-reasoning models capable of complex multi-step planning. The documentation specifically recommends several pre-trained models that excel at generating detailed specifications and implementation plans.

Codex 5.5 and Opus 4.7

The FAQ section "Which AI model should I use?" identifies Codex 5.5 and Opus 4.7 as the primary choices for OpenSpec workflows. These models offer:

  • Strong code-generation capabilities for drafting detailed technical specifications
  • High-reasoning power for analyzing complex architectural requirements
  • Consistent performance across both design-time (opsx:explore, opsx:propose) and implementation-time (opsx:apply) phases

Claude Code and Gemini CLI

For teams already using specific AI assistant ecosystems, Claude Code and Gemini CLI provide viable alternatives:

  • Claude Code excels at multi-step reasoning and following complex instruction sets, making it ideal for OpenSpec's multi-phase workflow
  • Gemini CLI offers strong natural-language understanding and produces consistent spec artifacts through command-line interfaces

Other Supported AI Assistants

OpenSpec maintains integrations with over 25 tools, as documented in docs/supported-tools.md. The framework supports any model accessible through chat interfaces or APIs, including Cursor, Windsurf, and GitHub Copilot.

How OpenSpec's Model-Agnostic Architecture Works

OpenSpec's design delegates all reasoning tasks to external LLMs. The framework constructs a prompt containing the current OpenSpec context and user instructions, then sends this to your configured model. As implemented in src/index.ts, the CLI reads the model name from configuration and passes it to the underlying request layer defined in package.json dependencies.

This architecture means you can swap models instantly without changing your OpenSpec installation—only the configuration needs updating.

Configuring Pre-trained Models in OpenSpec

You can specify which pre-trained model to use through three primary methods, offering flexibility for different development workflows.

Project Configuration via config.yaml

The primary configuration occurs in openspec/config.yaml. Create or edit this file to set your default model:


# openspec/config.yaml

model: codex-5.5          # any supported model name

context: |
  You are an expert software engineer familiar with Node.js, TypeScript, and the project's architecture.

The model: key accepts any identifier supported by your OpenSpec installation's provider integrations.

Runtime Overrides with CLI Flags

For quick experiments or one-off tasks, override the configuration using the --model flag:

openspec propose "Add a health-check endpoint" --model=opus-4.7

This approach is useful when testing how different models handle the same specification task without modifying project files.

Environment Variable Configuration

OpenSpec respects the OPENSPEC_MODEL environment variable, enabling model switching without file edits:

export OPENSPEC_MODEL=claude-code
openspec explore

This method works particularly well in CI/CD pipelines or when rotating between models for different project phases.

Practical Examples: Working with Pre-trained Models

Below are complete workflows demonstrating how to initialize OpenSpec and configure different pre-trained models:


# 1️⃣ Install OpenSpec globally

npm install -g @fission-ai/openspec

# 2️⃣ Initialize a repository (creates the openspec/ directory)

openspec init

# 3️⃣ Configure Codex 5.5 as your default model

cat > openspec/config.yaml <<'EOF'
model: codex-5.5
context: |
  You are an expert TypeScript developer working on a microservice that uses Express.
EOF

# 4️⃣ Generate a specification using the configured model

openspec propose "Add /health endpoint that returns 200 OK"

# 5️⃣ Review generated artifacts

openspec view      # terminal dashboard

openspec verify    # model-backed consistency check

# 6️⃣ Switch to Opus 4.7 for implementation without editing config

OPENSPEC_MODEL=opus-4.7 openspec apply

Key Source Files for Model Configuration

Understanding these files helps you customize your OpenSpec integration:

  • docs/faq.md – Contains the "Which AI model should I use?" section listing recommended high-reasoning models
  • docs/supported-tools.md – Enumerates all 25+ AI assistants and tools compatible with OpenSpec
  • openspec/config.yaml – Template for project-level model configuration
  • src/index.ts – CLI entry point showing how model selection is processed
  • package.json – Lists runtime dependencies for communicating with model providers (OpenAI, Anthropic, etc.)

Summary

  • OpenSpec is model-agnostic and does not ship with pre-trained models, instead integrating with external LLMs
  • Codex 5.5 and Opus 4.7 are the primary recommended models for high-quality spec generation
  • Configure models via openspec/config.yaml, the --model CLI flag, or the OPENSPEC_MODEL environment variable
  • The framework supports 25+ AI tools including Claude Code, Gemini CLI, Cursor, and GitHub Copilot
  • Model selection affects both planning phases (opsx:explore, opsx:propose) and implementation phases (opsx:apply)

Frequently Asked Questions

Can I use OpenSpec without a pre-trained AI model?

No, OpenSpec requires an external large language model to function. The framework acts as an orchestration layer that sends structured prompts to your chosen model and interprets the responses. Without a configured model (via config.yaml, --model flag, or environment variable), OpenSpec cannot generate specifications or implementation plans.

Which pre-trained model works best for OpenSpec beginners?

Codex 5.5 is recommended for beginners due to its strong code-generation capabilities and high-reasoning power, as documented in docs/faq.md. It produces detailed spec drafts and change plans with minimal prompt engineering. Alternatively, Opus 4.7 offers comparable reasoning depth and works well for both design and implementation tasks.

How do I switch between models for different project phases?

Use the OPENSPEC_MODEL environment variable to switch models without editing configuration files. For example, run OPENSPEC_MODEL=codex-5.5 openspec propose for planning phases, then OPENSPEC_MODEL=opus-4.7 openspec apply for implementation. You can also use the --model flag for individual commands, or maintain separate config.yaml files for different project branches.

Are there any costs associated with using pre-trained models with OpenSpec?

Yes, OpenSpec itself does not provide model inference; you must have access to your chosen models through their respective providers (OpenAI, Anthropic, Google, etc.). Costs depend on the provider's pricing for API usage or subscription fees for tools like Claude Code or GitHub Copilot. OpenSpec merely orchestrates the communication between your codebase and these external services.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →