Commit Graph

640 Commits

Author SHA1 Message Date
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
Alishahryar1 f1f97b16c5 Added OpenCode Go to README 2026-05-20 21:30:14 -07:00
Ali Khokhar 8bedfeafd6 Update README.md (#506) 2026-05-20 21:27:27 -07:00
Alishahryar1 af0954362f Update README 2026-05-20 21:24: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 d5715a607e Update README again 2026-05-20 21:14:21 -07:00
Alishahryar1 d1982b853c Updated README 2026-05-20 21:11:52 -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
Alishahryar1 54a9dc4e34 Update README voice section 2026-05-18 13:51:56 -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 868b3ac9b3 Update README 2026-05-17 16:51:00 -07:00
Alishahryar1 936040cb93 Remove agg ci job 2026-05-17 15:19:01 -07:00
Alishahryar1 64e9887dcf Make ci parallel 2026-05-17 15:16:43 -07:00
Alishahryar1 89d86d11ef Removed PLAN.md 2026-05-17 14:38:28 -07:00
Alishahryar1 543da3d66b Remove check local button from admin page 2026-05-17 13:04:07 -07:00
Alishahryar1 bd2aaed8ab fix ui spacing in admin page 2026-05-17 13:02:37 -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
dependabot[bot] dfddb19fff build(deps): bump the minor-and-patch group with 6 updates (#457) 2026-05-15 12:55:49 -07:00
Alishahryar1 0d0843c1c0 Updated default model 2026-05-13 22:59:04 -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
Ali Khokhar 615aba6e78 Update README.md 2026-05-11 00:50:17 -07:00
Ali Khokhar ce0e9c1ff5 Update README.md 2026-05-11 00:44:08 -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 05909e9493 Merge branch 'ali/codebase-architectre' 2026-05-10 22:30:44 -07:00
Alishahryar1 2637824a3f fix(openai): close async client with supported method 2026-05-10 22:30:23 -07:00
Ali Khokhar fd7dccea46 Update README.md 2026-05-10 22:21: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 16242b33a2 docs(readme): link providers, slim model picker section 2026-05-10 16:30:32 -07:00
Alishahryar1 2ea24e2510 Update README 2026-05-10 16:28:18 -07:00
Alishahryar1 2a2f2a2712 Update README 2026-05-10 16:25:53 -07:00
Alishahryar1 083b2161e7 Removed logos from README 2026-05-10 16:17:33 -07:00