mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 16:03:35 +00:00
Prepare for alternative Codex harness certification
This commit is contained in:
parent
11dd2f476b
commit
6dcb64565a
11 changed files with 337 additions and 375 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import os from "node:os";
|
||||
import type {
|
||||
ResponseFunctionToolCall,
|
||||
ResponseInput,
|
||||
|
|
@ -110,7 +111,7 @@ export const streamOpenAICodexResponses: StreamFunction<"openai-codex-responses"
|
|||
params.tools = convertTools(context.tools);
|
||||
}
|
||||
|
||||
const codexInstructions = await getCodexInstructions(params.model);
|
||||
const codexInstructions = getCodexInstructions();
|
||||
const bridgeText = buildCodexPiBridge(context.tools);
|
||||
const systemPrompt = buildCodexSystemPrompt({
|
||||
codexInstructions,
|
||||
|
|
@ -387,6 +388,7 @@ function createCodexHeaders(
|
|||
headers.set(OPENAI_HEADERS.ACCOUNT_ID, accountId);
|
||||
headers.set(OPENAI_HEADERS.BETA, OPENAI_HEADER_VALUES.BETA_RESPONSES);
|
||||
headers.set(OPENAI_HEADERS.ORIGINATOR, OPENAI_HEADER_VALUES.ORIGINATOR_CODEX);
|
||||
headers.set("User-Agent", `pi (${os.platform()} ${os.release()}; ${os.arch()})`);
|
||||
|
||||
if (promptCacheKey) {
|
||||
headers.set(OPENAI_HEADERS.CONVERSATION_ID, promptCacheKey);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue