# ElizaOS Developer Update
Week of November 15-21, 2025

## Core Framework

This week brought significant updates to the ElizaOS architecture with a focus on stability, database flexibility, and agent runtime improvements:

- **Server Test Alignment**: PR #6135 was successfully merged, aligning server tests with the latest ElizaOS API changes. This crucial work ensures consistent behavior between tests and production, particularly for agent management endpoints. The PR also includes improved plugin auto-injection semantics and more reliable test infrastructure.

- **Runtime Initialization**: A new `initPromise` was added to the `IAgentRuntime` interface, allowing better control over runtime startup sequences and improving error handling during initialization.

- **Database Provider Flexibility**: The framework now intelligently selects between MySQL and PostgreSQL database plugins based on environment configuration. When `MYSQL_URL` is set, the system automatically uses `@elizaos/plugin-mysql`; otherwise, it defaults to `@elizaos/plugin-sql` with PostgreSQL.

- **Dependency Modernization**: Successfully migrated from the deprecated LangChain v0.3 to the modern `@langchain/textsplitters` v1.0 package in PR #6152, ensuring long-term framework stability.

## New Features

### Improved Plugin Name Handling

PR #6164 enhances the plugin dependency system to accept multiple naming formats:

```typescript
// All these formats are now valid in plugin.json
{
  "dependencies": {
    "plugins": [
      "@elizaos/plugin-sql",  // Full npm package name
      "plugin-sql",           // Short name with prefix
      "sql"                   // Short name without prefix
    ]
  }
}
```

This makes plugin definition more flexible for developers while maintaining backward compatibility.

### Database Provider Auto-Selection

The framework now intelligently selects between MySQL and PostgreSQL:

```typescript
// Server-side database provider selection logic
const getDatabasePlugin = async () => {
  if (process.env.MYSQL_URL) {
    // Validate MySQL URL format
    validateAndLogMySQLUrl(process.env.MYSQL_URL);
    return import('@elizaos/plugin-mysql');
  } else {
    return import('@elizaos/plugin-sql');
  }
};

// MySQL-specific configuration when detected
if (process.env.MYSQL_URL) {
  // Use MySQL-specific migration service
  migrationService = new MySQLNoOpMigrationService();
  // Skip RLS configuration for MySQL
  skipRlsSetup = true;
}
```

### Runtime Initialization Promise

The agent runtime now includes a Promise-based initialization flow:

```typescript
// New interface addition
interface IAgentRuntime {
  // ... existing methods
  initPromise: Promise<void>;
  // ... other methods
}

// Usage example
const runtime = new AgentRuntime();
await runtime.initPromise; // Wait for complete initialization
```

## Bug Fixes

Several critical bugs were fixed this week:

1. **RLS Validation Fix**: Fixed an issue where Row-Level Security (RLS) server_id validation was incorrectly blocking all users when RLS isolation was disabled.

2. **OpenRouter Embedding Support**: Added native OpenRouter embedding support in the CLI, eliminating the need for a separate embedding provider configuration when using OpenRouter.

3. **Environment Variable Loading**: Fixed a critical issue where `runtime.getSetting()` would return `undefined` for environment variables exported on the host rather than defined in a `.env` file. This ensures consistent environment variable access across deployment environments.

4. **Entity Array Serialization**: Fixed PostgreSQL entity creation failures by normalizing the names field to ensure it's always a proper array before database operations, handling Set objects correctly.

## API Changes

The following API changes were introduced:

1. **Skip Migrations Option**:
   ```typescript
   // New parameter for runtime initialization
   await runtime.initialize({
     skipMigrations: true // Optional parameter to bypass plugin migrations
   });
   ```

2. **ElizaOS Reference in Runtime**:
   ```typescript
   // Check if ElizaOS is available in runtime
   if (runtime.hasElizaOS()) {
     const elizaOS = runtime.getElizaOS();
     // Use ElizaOS API for unified messaging
   }
   ```

3. **OpenRouter Embedding in CLI**:
   ```typescript
   // New embedding option automatically available in create command
   eliza create --name MyAgent --embedding openrouter
   ```

## Social Media Integrations

Active discussions are underway regarding Twitter plugin functionality issues. The team is investigating reported problems with the plugin-twitter functionality, as mentioned in the Discord #core-devs channel.

Development has started on a Discord plugin unification effort, with PR #24 in elizaos-plugins/plugin-discord repository working to implement a unified messaging API for the Discord plugin.

## Model Provider Updates

The ElizaOS framework now better supports OpenRouter embeddings with native CLI integration. When creating a new agent, developers can now select OpenRouter as their embedding provider directly:

```bash
# Command line usage
eliza create --embedding openrouter

# Or through interactive prompts
? Select embedding provider › 
  OpenAI
❯ OpenRouter
  Local
  Ollama
```

This eliminates the need to configure a separate embedding service when using OpenRouter as your primary AI provider.

## Breaking Changes

As part of the migration to the new ElizaOS token ecosystem, several token-related changes have been implemented:

1. **Token Migration Cutoff**: The migration from AI16Z to ElizaOS tokens is only eligible for tokens held before November 11, 2025, at 11:40 UTC. Newly purchased AI16Z tokens after this date cannot be migrated.

2. **API Changes**: Server tests now align with the latest ElizaOS API, which may affect custom integrations built on older API versions.

3. **Internal Loader API Removal**: The internal loader APIs `tryLoadFile` and `loadCharacterTryPath` have been removed as part of the server test alignment in PR #6135. If you were using these functions, you'll need to update your code.

4. **Plugin SQL Types Path**: Fixed an incorrect types path in the @elizaos/plugin-sql package.json exports, changing from `./types/index.d.ts` to `./dist/index.d.ts`. If you were explicitly importing types from the old path, update your imports.

The migration portal for token migration will remain open until February 5, 2026. For any migration issues, please use the official support ticket system.