feat(droid): wire OAuth proxy via customModels + fix subscription gate#74
feat(droid): wire OAuth proxy via customModels + fix subscription gate#74
Conversation
The droid adapter used 'custom:gpt-5.4-(codex-oauth-proxy)-0' as its default model ID — an old format generated by droid's interactive UI that requires a matching customModels entry in ~/.factory/settings.json. No such entry exists, causing droid to fall back to factory.ai's billed Opus 4.7 model instead of routing through the local OAuth proxy. Fix: use direct model slugs (e.g. 'gpt-5.4'). Droid honors OPENAI_BASE_URL for routing when given a plain slug, and the adapter already injects OPENAI_BASE_URL=http://127.0.0.1:10531/v1 + OPENAI_API_KEY=unused. Verified by the running data-detective session which uses 'gpt-5.5' this way. Also: - Add 'droid' to BARE_MODEL_HARNESSES (strips openai/ prefix) - Add droid entries to all cross-CLI aliases (cc-opus→gpt-5.5, cc-sonnet→gpt-5.4, cc-haiku→gpt-5.4-mini, pi-coder→gpt-5.3-codex, pi-deep→gpt-5.5) - Remove dead 'factory-droid' model resolution path (adapter is registered as 'droid'; the factory-droid custom:-prefix logic was never reachable) - Update tests to cover new droid alias mappings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Plain model slugs (gpt-5.5, etc.) cause droid to treat the model as
factory-hosted and fail with "No active subscription found". Custom model
entries in ~/.factory/settings.json get `custom:{slug}-0` IDs which signal
BYO-provider mode and skip the subscription check entirely.
- Add toCustomModelId() helper: converts slug → custom:{slug}-0 (droid's
auto-assigned ID format for unique per-slug entries)
- Session settings now write custom: prefixed IDs so droid routes through
the customModels entry's baseUrl (the OAuth proxy) instead of factory.ai
Note: ~/.factory/settings.json customModels must be populated with the GPT
subscription models pointing at the OAuth proxy (done separately).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
gpt-5.5etc.) in droid session settings trigger the factory.ai subscription gate. Thecustom:prefix signals BYO-provider mode and skips the check entirely.toCustomModelId()insrc/adapters/droid.ts: converts a bare slug →custom:{slug}-0(droid auto-assigns this ID to unique entries incustomModels). Already-prefixed IDs pass through unchanged.~/.factory/settings.json(local, not in repo): populated withcustomModelsentries for GPT-5.5, GPT-5.4, GPT-5.4-Mini, GPT-5.3-Codex all pointing at the OAuth proxy (http://127.0.0.1:10531/v1).src/model-resolution.ts: droid added toBARE_MODEL_HARNESSES; alias mappings added for cc-opus→gpt-5.5, cc-sonnet→gpt-5.4, cc-haiku→gpt-5.4-mini, pi-coder→gpt-5.3-codex, pi-deep→gpt-5.5.~/.flt/presets.json(local, not in repo): droid-coder, droid-deep, droid-mini, droid-reviewer presets added.How it works
~/.factory/settings.jsonand assigns eachcustomModelsentry an idcustom:{model_slug}-0model: "custom:gpt-5.4-0"(viatoCustomModelId)custom:prefix → BYO mode → uses the entry'sbaseUrl(http://127.0.0.1:10531/v1) andapiKey: "unused"→ OAuth proxy → ChatGPT Codex backendTest plan
codex-oauth startor equivalent)flt spawn droid-coderin a worktree — confirm droid opens with GPT-5.4 and responds without subscription errorflt spawn droid-deep— confirm GPT-5.5 worksflt spawn droid-mini— confirm GPT-5.4-mini worksflt spawn --cli droid --model cc-sonnet→ resolves to gpt-5.4 →custom:gpt-5.4-0🤖 Generated with Claude Code