Skip to content

Breaking Changes: Model Configuration and Environment Variables Update #453

Open
@miurla

Description

@miurla

Changes Overview

We have made two significant changes that require user action:

  1. Model Configuration Moved to JSON

    • All model configurations have been moved from environment variables to public/config/models.json
    • This includes:
      • Model IDs and names
      • Provider information
      • Tool calling configuration
      • Model status (enabled/disabled)
  2. Environment Variable Updates

    • Removed model-specific environment variables:
      • NEXT_PUBLIC_OLLAMA_MODEL
      • NEXT_PUBLIC_OLLAMA_TOOL_CALL_MODEL
      • NEXT_PUBLIC_AZURE_DEPLOYMENT_NAME
      • NEXT_PUBLIC_OPENAI_COMPATIBLE_MODEL
    • Renamed environment variable:
      • NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORYENABLE_SAVE_CHAT_HISTORY

Required Actions

1. Update Model Configuration

Development Mode

Edit public/config/models.json directly with your model configurations:

{
  "models": [
    {
      "id": "model-id",
      "name": "Model Name",
      "provider": "Provider Name",
      "providerId": "provider-id",
      "enabled": true,
      "toolCallType": "native|manual",
      "toolCallModel": "tool-call-model-id" // only if toolCallType is "manual"
    }
  ]
}

Docker Mode

Using Prebuilt Image

When using the prebuilt image (ghcr.io/miurla/morphic:latest), create a models.json file alongside your .env.local and update your docker-compose.yml to mount it:

services:
  morphic:
    image: ghcr.io/miurla/morphic:latest
    env_file: .env.local
    volumes:
      - ./models.json:/app/public/config/models.json
Building Your Own Image

When building your own Docker image from source:

  1. Clone the repository
  2. Edit public/config/models.json directly with your configurations
  3. Build and run the image using docker-compose

2. Update Environment Variables

  1. Remove the following variables from your .env.local:
    • NEXT_PUBLIC_OLLAMA_MODEL
    • NEXT_PUBLIC_OLLAMA_TOOL_CALL_MODEL
    • NEXT_PUBLIC_AZURE_DEPLOYMENT_NAME
    • NEXT_PUBLIC_OPENAI_COMPATIBLE_MODEL
  2. If you are using chat history storage, rename:
    • NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY to ENABLE_SAVE_CHAT_HISTORY

Documentation

For detailed configuration instructions, please refer to:

Migration Guide

  1. For Development: Edit public/config/models.json directly with your model settings
    For Docker: Create models.json alongside .env.local with your model settings
  2. Update your .env.local by removing the deprecated variables
  3. If using chat history, rename the environment variable
  4. Restart your development server or Docker container

Please report any issues you encounter during the migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions