mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 09:25:59 +03:00
[PR #65] [MERGED] feat: Add Droid (Factory.ai) provider support #254
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#254
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/65
Author: @bee4come
Created: 10/15/2025
Status: ✅ Merged
Merged: 10/15/2025
Merged by: @justlovemaki
Base:
main← Head:feature/add-droid-provider📝 Commits (3)
903c417Add Droid (Factory.ai) provider supportb28004bfeat: improve Droid provider implementation and configuration17ec64bfix: improve droid provider with context isolation and message parsing📊 Changes
11 files changed (+710 additions, -5 deletions)
View changed files
📝
README.md(+19 -2)📝
config.json.example(+2 -0)📝
package-lock.json(+1 -1)📝
provider_pools.json.example(+13 -0)📝
src/adapter.js(+44 -0)📝
src/common.js(+11 -2)➕
src/droid/README.md(+227 -0)➕
src/droid/droid-core.js(+257 -0)➕
src/droid/droid-strategy.js(+74 -0)📝
src/provider-strategies.js(+3 -0)➕
test-droid.js(+59 -0)📄 Description
Summary
This PR adds support for Factory.ai's Droid CLI as a new provider in the AIClient-2-API project, enabling OpenAI-compatible API access to Droid.
Changes
Core Implementation
src/droid/droid-core.js: Core service that wraps the Droid CLIdroid execcommands with proper flagssrc/droid/droid-strategy.js: Strategy pattern implementation for Droid protocolsrc/droid/README.md: Comprehensive documentationIntegration
src/adapter.js: AddedDroidApiServiceAdapterto adapter factorysrc/common.js: Added Droid constants and protocol mapping (droid → claude)src/provider-strategies.js: RegisteredDroidStrategyin strategy factoryREADME.md: Updated main documentation with Droid provider sectionKey Features
✅ OpenAI-Compatible API
/v1/chat/completionsendpoint/v1/modelsendpoint✅ Context Isolation
--cwdflag to run Droid in isolated temp directory✅ Message Format Support
✅ Security
--skip-permissions-unsafeflag for non-interactive executionTesting
All functionality has been tested and verified:
Test Results
✅ API requests work correctly
✅ Context isolation verified
✅ Message parsing handles all formats
✅ Security: Prompt injection attacks blocked
✅ Response format matches OpenAI spec
Configuration
Add to your config:
Prerequisites
Breaking Changes
None. This is a new feature addition.
Related Issues
N/A - New feature implementation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.