Conversation
|
Note: I noticed two small issues:
|
|
Thanks for the catch @sehawq! Both issues have been fixed in 7b5f2ca:
Also took the opportunity to align the harness structure with other providers:
All 9 tests passing. |
|
Nice work overall — structure looks solid and aligns well with the existing harnesses. A couple of things I noticed:
None of these are blockers, but (1) is a functional bug that will confuse users expecting session history to survive restarts. |
- save_history() now writes to session JSON so history survives restarts - Use fcntl.flock exclusive locking on session writes (ported from blender harness) - Reset modified flag after _save() - Remove sys.path.insert; rely on proper package installation - clear() also resets history Addresses review feedback from sehawq on HKUDS#101. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implement novita/agent-harness with OpenAI-compatible API client - Add chat completion, streaming, model listing support - Include CLI with chat, session, and config commands - Add tests with mocked API calls - Update registry.json with Novita entry - Update .gitignore to include novita/
- Fix NameError: pass api_key_opt via Click context to chat/stream commands - Fix NameError: add missing `import requests` in test_core.py - Extract ChatSession to core/session.py (matches other harness patterns) - Convert flat session commands to @cli.group() subcommands - Add missing utils/__init__.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- save_history() now writes to session JSON so history survives restarts - Use fcntl.flock exclusive locking on session writes (ported from blender harness) - Reset modified flag after _save() - Remove sys.path.insert; rely on proper package installation - clear() also resets history Addresses review feedback from sehawq on HKUDS#101. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2a4bacc to
77af57d
Compare
|
Thanks for the thorough review @sehawq! All three items
|
|
All three points from my previous comment have been properly addressed in version 2a4bacc 👍
A broader topic worth discussing: current harnesses target GUI applications or complex API services (GIMP, Blender, AdGuardHome with 58 endpoints). Novita is an OpenAI-compatible chat API with just a few endpoints — something most agent frameworks can already use directly via an HTTP client. Wrapping this in a CLI harness is technically clean, but it could set a precedent for every API provider to add a thin wrapper here. It might be helpful to define where the line lies between “software that leverages CLI infrastructure” and “an API that already speaks the agent’s own language.” I’ll leave the detailed analysis to @yuh-yang |
Good point! , I'm thinking maybe a provider aggregator. It could be LLM, image, videos with different providers. How do you like that |
Summary
This PR adds Novita AI provider integration to CLI-Anything.
What's New
cli-anything-novitacommand for accessing AI models via Novita's OpenAI-compatible API/separator):deepseek/deepseek-v3.2(default)zai-org/glm-5minimax/minimax-m2.5https://api.novita.ai/openaiAPI Key Configuration
Follows existing pattern:
NOVITA_API_KEYenvironment variable~/.config/cli-anything-novita/config.json--api-key <key>Tests
Changes
novita/agent-harness/- Complete CLI harness with backend, CLI, testsregistry.json- Added Novita entry.gitignore- Added novita directory patterns