Commit Graph

228 Commits

Author SHA1 Message Date
Alishahryar1 fedcc0a32b Fix Gemini thought signature replay 2026-05-31 15:13:37 -07:00
Alishahryar1 885c26d977 Surface upstream provider errors
Include copyable upstream status and error bodies in provider SSE failures for OpenAI-compatible and native Anthropic transports, while preserving retry behavior and safe logging defaults.
2026-05-31 14:48:51 -07:00
Alishahryar1 d501e5223a Fix live provider smoke defaults
Update live smoke model defaults for NIM, OpenRouter, and Gemini; normalize tool-call indexes; downgrade DeepSeek forced tool_choice; and add coverage for the provider smoke fixes.
2026-05-31 13:02:15 -07:00
Alishahryar1 e4d6dc1f94 fix: avoid dual gemini thinking controls 2026-05-29 17:05:43 -07:00
Alishahryar1 4631ff9c49 fix: update uv with install manager 2026-05-29 16:35:10 -07:00
Alishahryar1 cebdc02a32 fix: accept system role messages 2026-05-29 16:16:48 -07:00
Alishahryar1 8ae7795961 fix(gemini): nest google extra body for sdk 2026-05-24 11:10:29 -07:00
Alishahryar1 26c5b35698 Reorder providers in README and other places 2026-05-23 19:16:22 -07:00
Alishahryar1 a4d7d76040 Add Codestral Provider 2026-05-23 19:09:22 -07:00
Alishahryar1 fbb1d6586d feat(providers): native Anthropic Messages for Kimi, Fireworks, Z.ai
Route these providers through POST /messages with vendor headers and bases (including Kimi model list on OpenAI /v1/models). Remove Z.ai from OpenAI-chat server-tool rejection; extend tests and README.
2026-05-23 17:03:59 -07:00
Alishahryar1 ab842fd920 Add Cereberas Provider 2026-05-23 16:35:27 -07:00
Alishahryar1 b2f66db0bb Add Groq Provider 2026-05-23 16:31:48 -07:00
Alishahryar1 1324c36da5 Add Gemini Provider 2026-05-23 16:26:38 -07:00
Alishahryar1 870576937f Add Mistral Provider 2026-05-23 16:16:59 -07:00
Alishahryar1 b8c1f72865 fix installer dependency checks 2026-05-23 15:35:24 -07:00
Alishahryar1 51d5f29ae1 fix(opencode_go): authenticate with OPENCODE_API_KEY
OpenCode Zen and Go share OPENCODE_API_KEY and opencode_api_key; Remove OPENCODE_GO_API_KEY and settings field.
2026-05-20 21:37:55 -07:00
George Levis f5e49ea78d Add OpenCode Go subscription gateway provider (#505)
## Summary

Adds support for the **OpenCode Go** subscription gateway at
`opencode.ai/zen/go/v1`, as requested in #504.

OpenCode Go exposes the same OpenAI-compatible Chat Completions API as
OpenCode Zen, so the implementation reuses `OpenCodeProvider` with a
configurable `provider_name` parameter — avoiding code duplication.

### Changes
- **Provider**: `OpenCodeProvider` now accepts `provider_name` (defaults
to `"OPENCODE"` for backward compatibility)
- **Catalog**: New `opencode_go` descriptor with correct base URL,
credential, and capabilities
- **Registry**: `_create_opencode_go` factory that passes
`provider_name="OPENCODE_GO"`
- **Settings**: `opencode_go_api_key` and `opencode_go_proxy` fields
- **Admin UI**: OpenCode Go API key, proxy, and smoke model config
fields
- **API services**: `opencode_go` added to OpenAI Chat Completions
upstream IDs
- **Smoke config**: Default smoke model `opencode_go/gpt-5.3-codex`
- **Tests**: New test for base URL, provider name, and API key; existing
tests updated

## Test plan
- [x] `test_opencode_go_provider_config_uses_correct_base_url_and_name`
— passes
- [x] `test_create_provider_instantiates_each_builtin` — covers
opencode_go
- [x]
`test_provider_and_platform_registries_include_advertised_builtins` —
covers opencode_go
- [x] `uv run ruff format`, `ruff check`, `ty check`, `pytest` — pass
locally on Python 3.14

Closes #504.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Alishahryar1 <alishahryar2@gmail.com>
2026-05-20 21:22:20 -07:00
Alishahryar1 fe98abf675 feat(admin): add Fireworks API key and proxy to admin manifest
Registers FIREWORKS_API_KEY / FIREWORKS_PROXY in api/admin_config FIELDS so the UI can set credentials and provider status stays accurate.

Adds admin apply test and contract guards linking PROVIDER_CATALOG to FIELD_BY_KEY; updates .env.example.
2026-05-20 20:57:11 -07:00
Safal Karki 23e409cb43 Add fireworks AI support (#476) 2026-05-18 05:32:25 -07:00
Alishahryar1 c0c1f3d554 Reapply "set auto compaction window for fcc-claude to 190K"
This reverts commit 7068533cdb.
2026-05-17 19:58:44 -07:00
Alishahryar1 7068533cdb Revert "set auto compaction window for fcc-claude to 190K"
This reverts commit 9b5dc9c40b.
2026-05-17 19:57:19 -07:00
Alishahryar1 9b5dc9c40b set auto compaction window for fcc-claude to 190K 2026-05-17 19:56:54 -07:00
Alishahryar1 89d86d11ef Removed PLAN.md 2026-05-17 14:38:28 -07:00
Alishahryar1 494c6c9d9a open admin page on server startup 2026-05-17 12:59:48 -07:00
Ali Khokhar 943c3db61d Admin UX refactor, runtime fixes, and startup logging (#472)
## Summary

- Refactors the admin interface into focused views and simplifies the
header (removes noisy status labels; hides managed-source labels where
appropriate).
- Fixes Claude runtime settings handling, reduces Z.ai base URL leakage
in the admin UI, and streamlines API startup logging.
- Updates configuration and catalog behavior (including `.env.example` /
README), and expands automated tests around admin, app lifespan, and
config/registry behavior.

## Test plan

- [ ] `uv run ruff format`, `uv run ruff check`, `uv run ty check`, `uv
run pytest`
- [ ] Smoke the admin UI: navigation between views, settings save/load,
no sensitive URL leakage in the UI
- [ ] Confirm API startup logs are readable and not overly verbose in
normal operation
2026-05-17 12:55:00 -07:00
Ali Khokhar 37974db1ab Improve admin UX settings (#471)
## Summary
- split the admin UI into Providers, Model Config, and Messaging views
- remove generated env, diagnostics, smoke, managed-label, and fixed
cloud/runtime settings from the visible admin UX
- make Z.ai base URL, Claude workspace, and Claude CLI binary fixed
app-level behavior instead of managed env fields

## Verification
- uv run ruff format
- uv run ruff check
- uv run ty check
- uv run pytest
2026-05-17 12:36:43 -07:00
Alishahryar1 fc3ef0b5cc Migrate legacy env config on startup 2026-05-16 21:06:12 -07:00
Alishahryar1 d05446f0b2 Remove Anthropic API key from proxy child env 2026-05-16 15:13:05 -07:00
Alishahryar1 e5edffa246 Pass proxy auth token to Telegram CLI sessions 2026-05-16 15:07:45 -07:00
Alishahryar1 247d17160f Revert "Improve provider error diagnostics"
This reverts commit 327b393b05.
2026-05-16 14:49:36 -07:00
Alishahryar1 327b393b05 Improve provider error diagnostics 2026-05-16 14:48:09 -07:00
Alishahryar1 ac2c37f613 Use canonical FCC server log path 2026-05-16 11:51:45 -07:00
Alishahryar1 a728994e29 Update default config and workspace paths 2026-05-16 11:36:53 -07:00
Alishahryar1 f389cf415e fix: default logs to logs/ and ignore rotations (issue 427)
- Default LOG_FILE to logs/server.log in settings and admin config
- Create log parent directories in configure_logging
- Gitignore /logs/, /server.*.log; keep server.log for root override
- Add test for nested log path mkdir
2026-05-13 18:01:54 -07:00
Siarhei Krotau 972bc1661c feat(providers): add Z.ai Coding Plan provider (#440) 2026-05-13 12:02:15 -07:00
Rizki Kotet 32e2e4d755 feat(opencode): integrate OpenCode Zen provider and API key support (#426) 2026-05-12 08:44:54 -07:00
Alishahryar1 89f7ed6214 fix(cli): resolve claude command before launch 2026-05-11 00:41:51 -07:00
Alishahryar1 25695077c4 fix(cli): exit fcc-server cleanly on interrupt 2026-05-10 22:47:27 -07:00
Alishahryar1 ca2cf6a6c1 fix(cli): terminate launched process trees 2026-05-10 22:44:07 -07:00
Alishahryar1 2637824a3f fix(openai): close async client with supported method 2026-05-10 22:30:23 -07:00
Alishahryar1 41f2bc71a0 feat(providers): retry all upstream 5xx like 429
Generalize retryable_upstream_status to HTTP 500-599 plus 429.
Improve execute_with_retry log label with actual status.
Preserve OpenAI InternalServerError 5xx in map_error after overload check.
Unify native stream send: log via _raise_for_status then optional async aclose.
Add _maybe_await_aclose for httpx doubles in tests.
Rename openai compat retry tests to 5xx; parameterize native/limiter/mapping tests.
2026-05-10 19:56:14 -07:00
Alishahryar1 21ff2137ef feat(providers): retry upstream HTTP 503 like 429
Extend execute_with_retry with retryable_upstream_status for 429/503
shared backoff, reactive block, and TRACE provider.retry.scheduled.
Map InternalServerError(503) to APIError with preserved status.
Native transport closes-and-raises on 503 like 429 for clean retries.
Add NIM/OpenAI-compat and rate limiter tests.
2026-05-10 19:28:32 -07:00
Alishahryar1 29e7714337 feat(logging): structured TRACE events and end-to-end request correlation
Add core/trace.py with trace_event, traced_async_stream, and payload snapshots.
Merge TRACE fields into JSON logs; promote claude_session_id, http path/method.
Instrument API, messaging/CLI, and OpenAI-compat/native provider paths.
Harden log sink with enqueue and stdlib intercept re-entrancy guard.
Document behavior in .env.example and README; extend tests.
2026-05-10 18:24:48 -07:00
Nox 1e97dff214 fix: handle disallowed special tokens in tiktoken encoder (#382)
Co-authored-by: Alishahryar1 <alishahryar2@gmail.com>
2026-05-10 17:30:24 -07:00
Alishahryar1 f9fc614563 Allow unauthenticated root probes 2026-05-10 16:03:19 -07:00
Alishahryar1 e386a3c8aa Improve admin UI setup flow 2026-05-10 15:57:56 -07:00
Alishahryar1 8ee72968ed Initial admin impl 2026-05-10 01:21:16 -07:00
Alishahryar1 de8e902899 Add Claude CLI smoke matrices 2026-05-09 17:27:23 -07:00
Alishahryar1 07497c7ed8 Add NVIDIA NIM CLI smoke matrix and tool schema aliasing 2026-05-09 14:25:50 -07:00
Alishahryar1 5294661aa4 feat: add Wafer provider 2026-05-08 23:43:16 -07:00