Commit graph

46 commits

Author SHA1 Message Date
Alishahryar1
539854fe7b Refactor done using GLM-5 2026-02-15 21:58:03 -08:00
Alishahryar1
b83be84313 Add LM Studio provider support
- Introduced `LMStudioProvider` to the provider system.
- Added a new fixture `lmstudio_provider` in `conftest.py` for testing.
- Updated `get_provider` function to handle `lmstudio` as a valid provider type.
- Enhanced README and `.env.example` to include LM Studio configuration details.
- Updated settings to accommodate LM Studio's base URL and provider type.
- Added tests to verify the functionality of the LM Studio provider.
2026-02-15 19:41:03 -08:00
Alishahryar1
054f9869b7 Refactor rate limiting configuration to use unified provider settings
- Replaced NVIDIA NIM and OpenRouter specific rate limit settings with a generic provider rate limit in settings, tests, and environment files.
- Updated README.md to reflect the new provider rate limit configuration.
- Adjusted tests to validate the new provider rate limit attributes.
2026-02-15 11:03:59 -08:00
Alishahryar1
e5a096049d feat: add OpenRouter support and configuration options
- Introduced OpenRouter as a new provider option in settings and environment configuration.
- Updated README.md to include instructions for using OpenRouter.
- Enhanced the message converter to support reasoning content for OpenRouter.
- Added tests for OpenRouter provider functionality and message conversion.
- Updated dependencies to include OpenRouterProvider.
2026-02-15 10:50:53 -08:00
Alishahryar1
7dfcad2a4c Enhance logging and error handling across multiple modules
- Added request ID context to logging in FastAPI routes and NVIDIA NIM provider.
- Improved logging format to include context variables for better traceability.
- Updated message handling in Telegram and Claude handlers to log message previews.
- Enhanced error logging in NVIDIA NIM provider with request ID for easier debugging.
- Added logging for tree repository actions to track tree and node registrations.
2026-02-15 02:01:57 -08:00
Alishahryar1
ab74791e4b Improved logging coverage 2026-02-14 23:14:58 -08:00
Alishahryar1
0d292cd578 ci: enhance type checking in workflow and improve test coverage
- Added a step to fail the CI if any '# type: ignore' comments are found in Python files.
- Refactored tests to use mocking for better isolation and reliability.
- Updated type hints and casting in several files to improve type safety.
2026-02-14 23:01:11 -08:00
github-actions[bot]
9822e2d6a1 style: apply ruff format 2026-02-15 06:43:46 +00:00
Cursor Agent
575637bc94 fix: correct except clause syntax in request_utils (TypeError, ValueError)
Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-15 05:07:17 +00:00
Alishahryar1
7259b1def8 Optimized code in hot paths with z-ai/glm5 2026-02-14 19:59:46 -08:00
Alishahryar1
96747f2216 Updated token counting and removed non streaming support 2026-02-14 19:10:09 -08:00
Alishahryar1
ba344f26c9 Revamped logging 2026-02-14 18:55:33 -08:00
Alishahryar1
64e5b10612 Refactor done by z-ai/glm5 2026-02-14 18:47:26 -08:00
Alishahryar1
25b9d9d1e4 Added ruff and ty dependencies and lint 2026-02-14 18:00:21 -08:00
Cursor Agent
25c7123e33 Phase 7 & 8: Routes optimization refactor and request utils split
Phase 7 - Optimization handlers:
- Create api/optimization_handlers.py with try_prefix_detection,
  try_quota_mock, try_title_skip, try_suggestion_skip, try_filepath_mock
- Add try_optimizations() that runs handlers in order
- Refactor routes.create_message to use try_optimizations()
- Update test_routes_optimizations patch targets

Phase 8 - Request utils split:
- Create api/detection.py: is_quota_check_request, is_title_generation_request,
  is_prefix_detection_request, is_suggestion_mode_request,
  is_filepath_extraction_request
- Create api/command_utils.py: extract_command_prefix, extract_filepaths_from_command
- Slim request_utils.py to get_token_count + re-exports for backward compat

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-15 01:41:35 +00:00
Alishahryar1
42a833245f Removed all signal handler logic 2026-02-14 17:17:58 -08:00
Alishahryar1
bd1e097d74 fixed tool parser and added signal handlers 2026-02-14 04:25:12 -08:00
Alishahryar1
fabca59f5c lint 2026-02-13 17:24:18 -08:00
Alishahryar1
de7677ba6c added graceful shutdown 2026-02-13 13:40:49 -08:00
Alishahryar1
42bfb2da9b improve test coverage 2026-02-13 12:54:48 -08:00
Alishahryar1
697bc37faf Upon dequeue the current request immediately displays processing state instead of position 1 waiting 2026-02-08 04:06:41 -08:00
Alishahryar1
6d8f13d84e Added feature to update queue positions on telegram when messages are dequeued and added new tests 2026-02-08 04:00:58 -08:00
Alishahryar1
6102583026 Major Refactor Part 2 with kimi-k2.5 in claude code 2026-02-05 16:09:16 -08:00
Alishahryar1
fcbe204f44 Major refactor done with kimi-k2.5 in claude code 2026-02-05 10:51:33 -08:00
Alishahryar1
b3b3389ced fixed logging race condition 2026-02-03 19:42:30 -08:00
Alishahryar1
a971c45004 lint 2026-02-03 19:25:52 -08:00
Alishahryar1
81d41fb6d5 Added mocking for suggestion mode and file path extraction 2026-02-03 19:24:18 -08:00
Alishahryar1
78d0276d03 fixed /stop 2026-01-31 14:39:24 -08:00
Alishahryar1
8ce86f4267 fixed type errors 2026-01-31 14:13:09 -08:00
Alishahryar1
b0f77b67cc changed close to aclose 2026-01-31 14:05:41 -08:00
Alishahryar1
0ea3ec8741 added tree persistence 2026-01-31 13:56:06 -08:00
Alishahryar1
303767e346 fixed linter errors 2026-01-30 23:32:02 -08:00
Alishahryar1
7045e0ed44 add retry for telegram message edits with tests and updated rate telegram limit 2026-01-30 15:41:24 -08:00
Alishahryar1
3b037932d7 refactor to reduce coupling 2026-01-30 13:39:40 -08:00
Alishahryar1
312c365f54 Implemeted the 2 new optimizations 2026-01-30 03:25:05 -08:00
Alishahryar1
d958544c3d Migrated from telethon to telegram bot api 2026-01-30 00:38:39 -08:00
Alishahryar1
6eca7377ce Revert "Added rate limiter queue for telegram"
This reverts commit 6a4409d625.
2026-01-29 23:16:01 -08:00
Alishahryar1
82ab6d64e1 Revert "added messaging app rate limiter params"
This reverts commit 8ee1da7140.
2026-01-29 23:14:59 -08:00
Alishahryar1
8ee1da7140 added messaging app rate limiter params 2026-01-29 22:38:26 -08:00
Alishahryar1
6a4409d625 Added rate limiter queue for telegram 2026-01-29 22:28:18 -08:00
Alishahryar1
5fd7268d3f added tree based session handler 2026-01-29 18:17:42 -08:00
Alishahryar1
34035dfc05 fixed /stop not updating ui for all messages 2026-01-29 17:04:30 -08:00
Alishahryar1
bbbc38d6dd fixed start dir and workspace for telegram agent 2026-01-29 15:00:34 -08:00
Alishahryar1
f1efa22a82 fixed issues after refactor 2026-01-29 14:50:05 -08:00
Alishahryar1
83e23bfc31 added missing message handler 2026-01-29 14:45:15 -08:00
Alishahryar1
8678a62915 Major refactor done by itself 2026-01-29 14:40:08 -08:00