Fix bridge history, profile models, and Windows gateway handling (#845)
* feat: support profile-aware group chat bridge flows * feat: route cron jobs through hermes cli * Fix group chat routing and isolate bridge tests * Add Grok image-to-video media skill * Default Grok videos to media directory * Fix bridge profile fallback and cron repeat clearing * Refine bridge chat and gateway platform handling * Filter bridge tool-call text deltas * Preserve structured bridge chat history * Prepare beta release build artifacts * Fix Windows run profile resolution * Fix Windows path compatibility checks * Fix profile-scoped model page display * Hide Windows subprocess windows for jobs and updates * Hide Windows file backend subprocess windows * Avoid Windows gateway restart lock conflicts * Treat Windows gateway lock as running on startup * Force release Windows gateway lock on restart * Tighten Windows gateway lock cleanup * Update chat e2e source expectation * Bump package version to 0.5.30 --------- Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||
|
||||
vi.mock('../../packages/server/src/services/gateway-bootstrap', () => ({
|
||||
getGatewayManagerInstance: () => ({
|
||||
getUpstream: () => 'http://127.0.0.1:8642',
|
||||
getApiKey: () => null,
|
||||
}),
|
||||
}))
|
||||
|
||||
// Mock updateUsage so we can assert calls without real DB
|
||||
const { mockUpdateUsage } = vi.hoisted(() => ({
|
||||
mockUpdateUsage: vi.fn(),
|
||||
@@ -18,7 +11,7 @@ vi.mock('../../packages/server/src/db/hermes/usage-store', () => ({
|
||||
const mockFetch = vi.fn()
|
||||
vi.stubGlobal('fetch', mockFetch)
|
||||
|
||||
import { proxy, setRunSession } from '../../packages/server/src/routes/hermes/proxy-handler'
|
||||
import { proxy, setGatewayManagerForTest, setRunSession } from '../../packages/server/src/routes/hermes/proxy-handler'
|
||||
|
||||
function createMockCtx(overrides: Record<string, any> = {}) {
|
||||
const ctx: any = {
|
||||
@@ -70,6 +63,10 @@ function createSSEBody(events: string[]): ReadableStream<Uint8Array> {
|
||||
describe('Proxy Handler', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
setGatewayManagerForTest({
|
||||
getUpstream: () => 'http://127.0.0.1:8642',
|
||||
getApiKey: () => null,
|
||||
})
|
||||
})
|
||||
|
||||
it('rewrites /api/hermes/v1/* to /v1/*', async () => {
|
||||
|
||||
Reference in New Issue
Block a user