# ElizaOS Developer Update
**Week of April 28 to May 5, 2025**

## 1. Core Framework

This week brought significant improvements to the ElizaOS architecture, with a focus on environment variable handling and plugin system reliability:

- **Environment Variable Refactoring**: The team implemented a comprehensive refactor of environment variable handling ([PR #4445](https://github.com/elizaos/eliza/pull/4445)), adding detailed docstrings to improve maintainability ([PR #4446](https://github.com/elizaos/eliza/pull/4446)).

- **Plugin System Enhancements**: Fixed critical issues with plugin routes functionality ([PR #4415](https://github.com/elizaos/eliza/pull/4415)) and resolved ESM type generation problems across SQL, Bootstrap, and OpenAI packages ([PR #4442](https://github.com/elizaos/eliza/pull/4442)).

- **Agent Runtime Improvements**: The "Vibe coding" agent feature is now live on the `v2-develop` branch, though with limited functionality. Further updates are expected in the coming weeks.

- **V2 Release Timeline**: The team has announced that the V2 stable release is approximately two weeks away. Developers are advised to migrate to the `v2-develop` branch for new projects.

## 2. New Features

### Usage Tracking for OpenAI
The OpenAI plugin now emits model usage events for embeddings and image descriptions ([PR #4438](https://github.com/elizaos/eliza/pull/4438)), allowing for better resource management and cost tracking:

```typescript
// Example of tracking embedding usage
const { embeddings, totalTokens } = await openai.embedText(text);
// Event emitted: { modelName: "text-embedding-3-small", tokenCount: totalTokens }

// Example of tracking image description usage
const description = await openai.describeImage(imageUrl);
// Event emitted: { modelName: "gpt-4-vision", tokenCount: approximateTokens }
```

### Twitter Timeline Functionality
New Twitter timeline integration has been implemented ([PR #4429](https://github.com/elizaos/eliza/pull/4429)), allowing agents to access and interact with Twitter feeds:

```typescript
// Example of using the new timeline functionality
import { TwitterPlugin } from '@elizaos/plugin-twitter';

const twitter = new TwitterPlugin({ apiKey: process.env.TWITTER_API_KEY });
const timeline = await twitter.getHomeTimeline({ count: 10 });

// Process tweets
for (const tweet of timeline) {
  console.log(`@${tweet.user.screen_name}: ${tweet.text}`);
}
```

## 3. Bug Fixes

### CLI Version Detection
Fixed a critical bug where the CLI was showing incorrect version information, leading to confusion about which version was installed ([PR #4435](https://github.com/elizaos/eliza/pull/4435)):

```bash
# Before fix: Would sometimes report older version despite successful update
$ elizaos --version
1.0.0.Beta.38  # Incorrect

# After fix: Correctly reports installed version
$ elizaos --version
1.0.0.Beta.41  # Correct
```

### Plugin Routes
Resolved an issue where plugin routes were not functioning correctly, preventing API endpoints from being properly registered and accessed ([PR #4415](https://github.com/elizaos/eliza/pull/4415)). This fix ensures that custom plugin routes are consistently available.

## 4. API Changes

### Publish Command Refactoring
The `elizaos publish` command has been refactored and enhanced ([PR #4424](https://github.com/elizaos/eliza/pull/4424)), improving the developer experience when publishing plugins and agents to the ElizaOS registry:

```bash
# New improved publish command with better error handling
elizaos publish --name "my-plugin" --version "1.0.0" --description "My awesome plugin"
```

### Authentication Improvements
Added comprehensive auth middleware with API key dialog for unauthorized requests ([PR #4420](https://github.com/elizaos/eliza/pull/4420)). This improves security and provides a better user experience for authentication flows.

## 5. Social Media Integrations

### Twitter Agent Setup Documentation
A comprehensive blog post has been added to guide developers through Twitter agent setup ([PR #4425](https://github.com/elizaos/eliza/pull/4425)). This documentation includes step-by-step instructions for API key acquisition, configuration, and deployment.

### Twitter Plugin Cleanup
The Twitter plugin has undergone significant cleanup and optimization ([PR #4430](https://github.com/elizaos/eliza/pull/4430)), making it more reliable and easier to use:

```typescript
// New cleaner Twitter API usage
import { TwitterPlugin } from '@elizaos/plugin-twitter';

const twitter = new TwitterPlugin({
  apiKey: process.env.TWITTER_API_KEY,
  apiSecret: process.env.TWITTER_API_SECRET,
  accessToken: process.env.TWITTER_ACCESS_TOKEN,
  accessTokenSecret: process.env.TWITTER_ACCESS_TOKEN_SECRET
});

// Post a tweet
await twitter.postTweet("Hello from ElizaOS!");
```

### Twitter API Integration Issues
Several users have reported being rate-limited or flagged when using the Twitter API integration. The team is investigating configuration improvements to prevent these issues. In the meantime, developers are advised to carefully monitor their API usage and implement appropriate rate limiting.

## 6. Model Provider Updates

### OpenAI Custom Embedding Endpoints
The OpenAI plugin has been extended to support custom embedding endpoints ([PR #4421](https://github.com/elizaos/eliza/pull/4421)), allowing for more flexibility in model selection and deployment:

```typescript
// Example of using custom embedding endpoints
const openai = new OpenAIPlugin({
  apiKey: process.env.OPENAI_API_KEY,
  embeddingEndpoint: "https://custom-embedding-service.example.com/v1/embeddings"
});

const embeddings = await openai.embedText("This is a test");
```

### Optimized Model Selection
Implemented smarter model selection logic that uses smaller, more efficient models for certain types of requests ([PR #4416](https://github.com/elizaos/eliza/pull/4416)):

```typescript
// The system now automatically selects the appropriate model
// based on the context and requirements
const response = await generateText({
  prompt: "Summarize this article",
  content: longArticleText,
  // No need to specify model - system selects appropriate one
});
```

### Deprecated Model Provider Plugins
Multiple deprecated model provider plugins have been removed from the monorepo, including:
- Ollama ([PR #4437](https://github.com/elizaos/eliza/pull/4437))
- Groq ([PR #4436](https://github.com/elizaos/eliza/pull/4436))
- Venice ([PR #4434](https://github.com/elizaos/eliza/pull/4434))
- Anthropic ([PR #4427](https://github.com/elizaos/eliza/pull/4427))

These providers are still supported but now maintained in separate repositories.

## 7. Breaking Changes

### Migration from V1 to V2

The release of V2 is coming in approximately two weeks. Developers should be aware of these key breaking changes:

1. **Plugin Architecture**: The plugin system has been completely redesigned in V2. Plugins must be created using the new CLI command:
   ```bash
   npx @elizaos/cli@beta create
   ```

2. **Character System**: V2 uses an improved character definition format that is not backward compatible with V1.

3. **CLI Commands**: Many CLI commands have changed between V1 and V2. Use `elizaos --help` to see the latest commands.

4. **Environment Variables**: The environment variable handling has been refactored. Review your `.env` files and update them according to the new documentation.

5. **Deprecated Plugins**: Several plugins have been removed from the monorepo. If you were using Ollama, Groq, Venice, or Anthropic plugins, you'll need to install them separately.

**Important:** The official documentation at docs.eliza.how is currently being updated for V2. In the meantime, the best source of information is the `v2-develop` branch in the GitHub repository.