mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-29 15:38:01 -05:00
♻️(engine): extract custom header parsing and update OpenAiEngine
- export parseCustomHeaders from src/utils/engine.ts - use parseCustomHeaders in OpenAiEngine for config.customHeaders - remove try/catch and inline JSON.parse logic - update config test to expect headers as object and drop JSON.parse Centralize header parsing for reuse and simplify engine code Update tests to match new header format for clarity
This commit is contained in:
@@ -12,7 +12,7 @@ import { GroqEngine } from '../engine/groq';
|
||||
import { MLXEngine } from '../engine/mlx';
|
||||
import { DeepseekEngine } from '../engine/deepseek';
|
||||
|
||||
function parseCustomHeaders(headers: any): Record<string, string> {
|
||||
export function parseCustomHeaders(headers: any): Record<string, string> {
|
||||
let parsedHeaders = {};
|
||||
|
||||
if (!headers) {
|
||||
|
||||
Reference in New Issue
Block a user