1
0
forked from boos/BoosAPI
Commit Graph

630 Commits

Author SHA1 Message Date
Cita 1e12ec5211 Merge pull request #35 from cita-777/codex/run-release.yml-to-simulate-github-actions-ohq25x
Normalize downloaded dist layout in release workflow, skip npmRebuild during packaging, bump version to 1.2.1
2026-03-06 23:28:22 +08:00
Cita 87d772703f Merge branch 'main' into codex/run-release.yml-to-simulate-github-actions-ohq25x 2026-03-06 23:27:30 +08:00
Cita 200489539b chore: bump version to 1.2.1 2026-03-06 23:26:59 +08:00
Cita 95c7b5b10d Merge pull request #34 from cita-777/codex/run-release.yml-to-simulate-github-actions-8hwayv
Normalize dist layout and disable npm rebuild in release workflow
2026-03-06 23:07:26 +08:00
cita 3124b26bd0 Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-06 22:45:00 +08:00
cita 0d99419b9f feat: implement GOB encoding support for user ID extraction and enhance cookie handling in NewApiAdapter 2026-03-06 22:44:56 +08:00
Cita 1263edbccf Merge branch 'main' into codex/run-release.yml-to-simulate-github-actions-8hwayv 2026-03-06 22:01:51 +08:00
Cita d668906c8e ci: normalize dist artifact before desktop packaging 2026-03-06 22:00:29 +08:00
Cita 81e61f96d8 Merge pull request #33 from cita-777/codex/run-release.yml-to-simulate-github-actions
Disable npm rebuild during desktop packaging and remove AppImage prefetch step
2026-03-06 21:43:27 +08:00
Cita 5e6e1ca245 ci: make release packaging locally reproducible 2026-03-06 21:36:23 +08:00
cita 02bf0393e6 feat: enhance desktop build process with artifact upload and download, and update server working directory resolution 2026-03-06 20:25:48 +08:00
cita 6c51801e50 feat: add macOS ad-hoc signing support
- Implemented afterPack script to ensure ad-hoc signature for macOS builds.
- Created macosSignUtils module to handle app path retrieval, signature inspection, and ad-hoc signing.
- Added functions to check if the app is signed and apply ad-hoc signing if necessary.
2026-03-06 19:58:38 +08:00
cita 19125d686e Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-06 19:29:12 +08:00
cita 56b930495b feat: enhance release workflow with Electron cache restoration and retry logic for desktop builds 2026-03-06 19:29:10 +08:00
Cita 1c98db723e Merge pull request #32 from Zhou-Ruichen/fix/suppress-duplicated-reasoning-content
fix(chatFormats): suppress content when it duplicates reasoning_content
2026-03-06 18:41:48 +08:00
cita e88fc0a997 feat: implement proxy billing details handling and resolveProxyLogBilling function 2026-03-06 18:28:45 +08:00
Ruichen Zhou 83608c3521 fix(chatFormats): suppress content when it duplicates reasoning_content
Some upstream providers (e.g. certain OpenAI-compatible aggregators)
emit thinking/reasoning tokens with the same text written to both
delta.content and delta.reasoning_content simultaneously.

When metapi forwarded these chunks as-is, downstream clients would read
delta.content and display the internal reasoning text to end users —
appearing as word-by-word "thinking narration" in chat interfaces.

Fix: after resolving both contentDelta and reasoningDelta, suppress
contentDelta when it is non-empty and identical to reasoningDelta.
This covers the duplicate-write pattern without affecting any legitimate
case (a provider would never intentionally set content == reasoning).
2026-03-06 11:28:07 +01:00
cita 3748e6dcb6 feat: add proxy log billing details handling and schema management 2026-03-06 18:12:12 +08:00
cita bf216d7011 Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-06 17:10:04 +08:00
cita 55b1ae564e feat: update error messages in NewApiAdapter tests to use correct Chinese translations
feat: enhance proxy usage parser to include cache read and creation tokens

feat: add billing details to ProxyLog interface and implement related formatting functions

fix: correct mojibake issues in source files and add regression test for mojibake detection

chore: add SQL migration for billing details in proxy_logs table

test: improve site speed button tests to ensure proper state updates without DOM lookups
2026-03-06 17:10:01 +08:00
Cita 4d9bd52c01 Update star history chart link format 2026-03-06 16:58:30 +08:00
cita 2a810facb8 feat: implement macOS notarization and ad-hoc signing in afterSign script
feat: add run-server script to manage server execution and compatibility checks

feat: create main application logic for desktop with window management, server handling, and auto-updater

test: add unit tests for desktop runtime helpers

feat: implement desktop server environment configuration and health check

test: add tests for server configuration and desktop routes

feat: add native module guard for better-sqlite3 compatibility

test: add tests for native module guard functionality

test: add comprehensive tests for account verification feedback handling

feat: implement account verification feedback helpers

chore: add TypeScript configuration for desktop builds
2026-03-06 16:24:41 +08:00
cita acdc846b13 Refactor logging timestamps to use formatUtcSqlDateTime function across proxy routes and services; add storedTimestampRepairService for fixing createdAt values in database 2026-03-06 11:57:30 +08:00
cita 7fda94f27d feat(models): update model selection logic and add comprehensive tests for /v1/models route 2026-03-05 21:52:35 +08:00
cita fdf4f30987 feat: add createdAt timestamps to check-in logs and improve i18n translations
- Added createdAt timestamps to various check-in log entries in checkinService.ts for better tracking.
- Updated i18n translations in Models.tsx to improve user experience with accurate Chinese translations.
- Reduced default page size in ProgramLogs.tsx and ProxyLogs.tsx from 80 and 100 to 50 for better performance.
- Enhanced ProxyLogs.tsx with memoization for filtered logs and summary statistics.
- Implemented support for parsing Unix timestamps and PostgreSQL-style timezone offsets in checkinLogTime.ts.
- Added comprehensive tests for database proxy query wrapper in index.proxy-wrap.test.ts to ensure functionality.
2026-03-05 21:18:49 +08:00
cita 0d5e56f478 feat(settings): add validation for SQLite connection strings and improve error messages 2026-03-05 19:37:09 +08:00
cita b122893796 Add tests for settings database runtime configuration API
- Implement tests for retrieving and saving runtime database configuration.
- Validate handling of invalid configuration payloads.
- Utilize Fastify for API testing with Vitest.
- Ensure proper cleanup of database state between tests.
2026-03-05 18:57:18 +08:00
cita 283c052fa5 test:Add database migration service with normalization and masking functions
- Implemented `normalizeMigrationInput` to standardize database migration input for sqlite, mysql, and postgres.
- Added `maskConnectionString` to obscure sensitive credentials in connection strings.
- Created comprehensive tests for migration input normalization and connection string masking.
- Established database schema creation logic for multiple dialects (sqlite, mysql, postgres).
- Developed functions for managing database transactions, including begin, commit, and rollback.
- Implemented data insertion logic from backup snapshots into the target database.
2026-03-05 17:38:52 +08:00
cita 0168592c95 Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-05 14:28:12 +08:00
cita 4a61148b4f feat(accounts): extend rebind-session API to handle refresh token and expiration fields 2026-03-05 14:28:10 +08:00
Cita b6860df426 Update Star History chart image link in README 2026-03-05 13:25:17 +08:00
cita 27501b5a85 feat(ProgramLogs): add event status summary parsing and corresponding labels 2026-03-05 13:08:59 +08:00
cita 11fc61f4fa feat(donehub): add user self endpoint handling and balance calculation logic 2026-03-05 12:23:45 +08:00
cita 24769706e1 feat(proxy): enhance error handling for chat proxy requests with fallback logic 2026-03-04 22:12:02 +08:00
cita ecc117d7ee feat(proxy): update endpoint resolution order for 'anyrouter' platform 2026-03-04 21:48:26 +08:00
cita ebc5934547 feat(platforms): enhance platform detection by adding URL hinting logic 2026-03-04 21:05:30 +08:00
cita 9fbf434bd6 feat(proxy): enhance upstream endpoint handling and error summarization
- Added new utility functions for building minimal JSON headers and normalizing responses for compatibility.
- Implemented detailed error handling for unsupported media types and endpoint downgrade scenarios.
- Introduced a new endpoint flow mechanism to manage retries and downgrades between different upstream endpoints.
- Enhanced tests for endpoint flow and error summarization to cover various edge cases and scenarios.
- Updated CSS styles for accounts table to improve layout and responsiveness.
- Refactored ModelTester component to handle incremental text updates more effectively.
2026-03-04 20:59:48 +08:00
cita 82e9f3b601 Add tests for accounts login shield and proxy log retention service
- Implement tests for accounts login shield detection, verifying behavior when login fails with HTML JSON parse syntax error.
- Create tests for proxy log retention service, ensuring expired logs are deleted based on retention days and that cleanup is skipped when retention is disabled.
- Add tests for token router cache, validating that route snapshots are maintained within TTL until explicitly invalidated.
- Introduce necessary mock setups and database seeding for comprehensive testing.
2026-03-04 14:59:06 +08:00
cita 536d957a9e Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-04 13:46:34 +08:00
cita e281e45e84 feat: add comprehensive tests for token candidates and proxy log path metadata
- Implemented tests for the `/api/models/token-candidates` endpoint to verify model availability and token coverage scenarios.
- Added tests for `composeProxyLogMessage` to ensure proper formatting of log messages with downstream and upstream metadata.
- Created utility functions for parsing proxy log path metadata and handling missing token hints.
- Developed tests for the `Sites` and `TokenRoutes` components to validate UI behavior and interactions, including scrolling and group expansion.
- Introduced a custom hook `useAnimatedVisibility` for managing visibility animations in components.
- Enhanced the documentation link for site resources.
2026-03-04 13:46:31 +08:00
Cita 4b77207d03 Update star history chart version in README 2026-03-03 18:50:28 +08:00
cita d49fcefa05 feat: 增强错误处理,添加对特定无效请求的处理逻辑 2026-03-03 17:29:37 +08:00
cita 9ff138f0b5 feat: 添加 Telegram 通知支持,更新配置和文档 2026-03-03 17:25:27 +08:00
ciat-777 cf6b2285fb feat: 更新文档,添加项目架构和界面预览部分 2026-03-03 15:13:52 +08:00
ciat-777 eff6f22f6d Add unit tests for backupService to validate import/export functionality 2026-03-03 14:50:59 +08:00
ciat-777 5cebc1554f feat: 增强聊天代理流行为,优化错误处理和工具调用逻辑 2026-03-03 00:03:34 +08:00
ciat-777 e2fce12e20 feat: 更新文档链接,增强客户端接入指南,优化代理日志记录和错误处理 2026-03-02 23:43:29 +08:00
ciat-777 fed7ea7023 feat: 增强测试用例以支持函数调用和输出,优化工具参数处理逻辑 2026-03-02 23:11:38 +08:00
ciat-777 555f6e15ab feat: enhance tool call handling and serialization in chat formats
- Added support for tool calls in NormalizedFinalResponse type.
- Implemented functions to collect and serialize tool calls from OpenAI and Claude responses.
- Updated convertClaudeRequestToOpenAiBody to handle tool use and tool result messages.
- Enhanced normalizeUpstreamFinalResponse to include tool calls in the response structure.
- Introduced utility functions for safe JSON stringification and parsing.
- Improved conversion functions for OpenAI tools to Anthropic format and vice versa.
- Updated input handling in convertOpenAiBodyToMessagesBody and convertOpenAiBodyToResponsesBody to accommodate tool messages.
- Refactored serialization logic in serializeFinalResponse and buildSyntheticOpenAiChunks to include tool calls.
2026-03-02 22:18:13 +08:00
ciat-777 515d083b2c feat: 添加 Zeabur 一键部署指南和相关变量说明 2026-03-02 21:08:07 +08:00