Commit Graph
153 Commits
Author SHA1 Message Date
Finessse f022b151c2 openai: return JSON error envelopes 2025-12-18 16:49:45 +07:00
Finessse 626f501f49 droid: map custom: model ids to real model names 2025-12-18 16:32:08 +07:00
Finessse 358f7a6439 codex: synth SSE for huge/compaction responses with MAX_TOKENS retry 2025-12-18 14:18:28 +07:00
Finessse 99eb979353 models: add gemini-3-flash and gemini-3-pro-low (antigravity) 2025-12-18 14:17:57 +07:00
Finessse e2fe9f2403 auth: primary email override, trace headers, and cooldown reset 2025-12-18 01:43:07 +07:00
Finessse 72be557be8 middleware: keep tools for droid/factory 2025-12-17 20:34:06 +07:00
Finessse efb6965ef3 openai: treat Droid UA as agentic 2025-12-17 20:29:48 +07:00
Finessse e57cfdffb2 openai: inject default Factory tools 2025-12-17 20:29:17 +07:00
Finessse 944f70aedb factory: compact huge droid history + inject instructions 2025-12-17 20:14:01 +07:00
Finessse 1d2a9f6b5e factory: truncate oversized input_text 2025-12-17 20:01:56 +07:00
Finessse 1548b30abb openai: convert <tool_call> tags to function_call 2025-12-17 19:25:23 +07:00
Finessse d219b04b69 openai: enforce strict tool args 2025-12-17 19:18:06 +07:00
Finessse 6f1cb57908 test: cover antigravity strict fallback 2025-12-17 18:13:36 +07:00
Finessse ee8bbb3aa8 auth: strict fallback for antigravity creds 2025-12-17 18:13:28 +07:00
Finessse d8e55c7318 auth: allow probing unknown client model support 2025-12-17 18:02:15 +07:00
Finessse 0d6e1e6037 openai: stream errors to factory-cli as SSE 2025-12-17 17:37:51 +07:00
Finessse 52d5bd83f2 openai: return JSON error when streaming fails early 2025-12-17 17:06:49 +07:00
Finessse 5a576264dd feat(routing): gemini-3-pro fallback to gemini-cli 2025-12-17 14:20:33 +07:00
Finessse f9859ff6f3 fix(droid): strip non-JSON done sentinel from SSE 2025-12-17 14:19:23 +07:00
Finessse 7f260eb15e feat(openai): add embeddings + base-url aliases 2025-12-17 14:18:38 +07:00
Finessse 99e9ff1ad6 docs: Claude Code via local proxy
- Document Windows Claude Code settings for using CLIProxyAPI (base URL, auth token, default model mapping)
- Add Claude alias remapping for opus/sonnet/haiku to Gemini-backed models
- Improve auth unavailability reporting (429 cooldown vs 503 blocked) and fallback provider inference
2025-12-17 00:33:25 +07:00
Finessse 4303412761 Fix synthetic /v1/responses SSE for tool calls 2025-12-16 13:23:47 +07:00
Finessse d0da29f954 Fix /v1/responses streaming for Factory Droid 2025-12-16 13:00:22 +07:00
Finessse 4b4cd108ce Fix tool result ordering for Droid CLI 2025-12-14 23:34:54 +07:00
Luis Pater b6ad243e9e Merge pull request #498 from teeverc/fix/claude-streaming-flush
fix(claude): flush Claude SSE chunks immediately
2025-12-13 23:58:34 +08:00
hkfires e7cedbee6e fix(auth): prevent duplicate iflow BXAuth tokens 2025-12-12 19:57:19 +08:00
teevercandgemini-code-assist[bot] 5ab3032335 Update sdk/api/handlers/claude/code_handlers.go
thank you gemini

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-12 00:26:01 -08:00
teevercandAmp 1215c635a0 fix: flush Claude SSE chunks immediately to match OpenAI behavior
- Write each SSE chunk directly to c.Writer and flush immediately
- Remove buffered writer and ticker-based flushing that caused delayed output
- Add 500ms timeout case for consistency with OpenAI/Gemini handlers
- Clean up unused bufio import

This fixes the 'not streaming' issue where small responses were held
in the buffer until timeout/threshold was reached.

Amp-Thread-ID: https://ampcode.com/threads/T-019b1186-164e-740c-96ab-856f64ee6bee
Co-authored-by: Amp <amp@ampcode.com>
2025-12-12 00:14:19 -08:00
Luis Pater 6e2306a5f2 refactor(handlers): improve request logging and payload handling 2025-12-12 08:52:52 +08:00
hkfires 88bdd25f06 fix(amp): set status on claude stream errors 2025-12-11 20:12:06 +08:00
Luis Pater 423ce97665 feat(util): implement dynamic thinking suffix normalization and refactor budget resolution logic
- Added support for parsing and normalizing dynamic thinking model suffixes.
- Centralized budget resolution across executors and payload helpers.
- Retired legacy Gemini-specific thinking handlers in favor of unified logic.
- Updated executors to use metadata-based thinking configuration.
- Added `ResolveOriginalModel` utility for resolving normalized upstream models using request metadata.
- Updated executors (Gemini, Codex, iFlow, OpenAI, Qwen) to incorporate upstream model resolution and substitute model values in payloads and request URLs.
- Ensured fallbacks handle cases with missing or malformed metadata to derive models robustly.
- Refactored upstream model resolution to dynamically incorporate metadata for selecting and normalizing models.
- Improved handling of thinking configurations and model overrides in executors.
- Removed hardcoded thinking model entries and migrated logic to metadata-based resolution.
- Updated payload mutations to always include the resolved model.
2025-12-11 03:10:50 +08:00
hkfires 347769b3e3 fix(openai-compat): use model id for auth model display 2025-12-09 18:09:14 +08:00
hkfires da23ddb061 fix(gemini): normalize model listing output 2025-12-09 17:34:15 +08:00
vuonglv(Andy) 5c3a013cd1 feat(config): add configurable host binding for server (#454)
* feat(config): add configurable host binding for server
2025-12-08 23:16:39 +08:00
Luis Pater 0ebabf5152 feat(antigravity): add FetchAntigravityProjectID function and integrate project ID retrieval 2025-12-06 01:32:12 +08:00
Luis Pater c44c46dd80 Fixed: #421
feat(antigravity): implement project ID retrieval and integration in payload processing
2025-12-06 00:40:55 +08:00
Luis Pater 0fd2abbc3b **refactor(cliproxy, config): remove vertex-compat flow, streamline Vertex API key handling**
- Removed `vertex-compat` executor and related configuration.
- Consolidated Vertex compatibility checks into `vertex` handling with `apikey`-based model resolution.
- Streamlined model generation logic for Vertex API key entries.
2025-12-02 09:18:24 +08:00
Aero 0ebb654019 feat: Add support for VertexAI compatible service (#375)
feat: consolidate Vertex AI compatibility with API key support in Gemini
2025-12-02 08:14:22 +08:00
Luis Pater a748e93fd9 **fix(executor, auth): ensure index assignment consistency for auth objects**
- Updated `usage_helpers.go` to call `EnsureIndex()` for proper index assignment in reporter initialization.
- Adjusted `auth/manager.go` to assign auth indices inside a locked section when they are unassigned, ensuring thread safety and consistency.
2025-11-30 16:56:29 +08:00
hkfires 022aa81be1 feat(cliproxy): support wildcard exclusions for models 2025-11-30 08:02:00 +08:00
hkfires c43f0ea7b1 refactor(config): rename model blacklist fields to excluded models 2025-11-29 21:23:47 +08:00
hkfires 6a191358af fix(auth): fix runtime auth reload on oauth blacklist change 2025-11-29 20:30:11 +08:00
hkfires 5983e3ec87 feat(auth): add oauth provider model blacklist 2025-11-28 10:37:10 +08:00
hkfires f8cebb9343 feat(config): add per-key model blacklist for providers 2025-11-27 21:57:07 +08:00
hkfires 6c17dbc4da style(amp): tidy whitespace in proxy module and tests 2025-11-26 18:57:26 +08:00
Luis Pater a4a26d978e Fixed: #339
**feat(handlers, executor): add Gemini 3 Pro Preview support and refine Claude system instructions**

- Added support for the new "Gemini 3 Pro Preview" action in Gemini handlers, including detailed metadata and configuration.
- Removed redundant `cache_control` field from Claude system instructions for cleaner payload structure.
2025-11-26 11:42:57 +08:00
Luis Pater 506f1117dd **fix(handlers): refactor API response capture to append data safely**
- Introduced `appendAPIResponse` helper to preserve and append data to existing API responses.
- Ensured newline inclusion when appending, if necessary.
- Improved `nil` and data type checks for response handling.
- Updated middleware to skip request logging for `GET` requests.
2025-11-25 11:37:02 +08:00
Luis Pater bb9955e461 **fix(auth): resolve index reassignment issue during auth management**
- Fixed improper handling of `indexAssigned` and `Index` during auth reassignment.
- Ensured `EnsureIndex` is invoked after validating existing auth entries.
2025-11-24 10:10:09 +08:00
Luis Pater 7063a176f4 #293
**feat(retry): add configurable retry logic with cooldown support**

- Introduced `max-retry-interval` configuration for cooldown durations between retries.
- Added `SetRetryConfig` in `Manager` to handle retry attempts and cooldown intervals.
- Enhanced provider execution logic to include retry attempts, cooldown management, and dynamic wait periods.
- Updated API endpoints and YAML configuration to support `max-retry-interval`.
2025-11-24 09:55:15 +08:00
Luis Pater 327cc7039e **refactor(auth): use customizable HTTP client for Antigravity requests**
- Replaced `http.DefaultClient` with a configurable `http.Client` instance for Antigravity OAuth flow methods.
- Updated `exchangeAntigravityCode` and `fetchAntigravityUserInfo` to accept `httpClient` as a parameter.
- Added `util.SetProxy` usage to initialize the `httpClient` with proxy support.
2025-11-21 20:54:56 +08:00