History

refactor(translator): remove unused log dependency and comment out debug logging

docs: add GPT-5 Codex guidelines for CLI usage - Added detailed guidelines for GPT-5 Codex in Codex CLI. - Expanded instructions on sandboxing, approvals, editing constraints, and style requirements. - Included presentation and response formatting best practices. fix(codex_instructions): update comparison logic to use prefix matching - Changed system instructions comparison to use `strings.HasPrefix` for improved flexibility.

Luis Pater committed 1 year agov6.2.30

Commit f6cf7841 parent e78392318 files · +2 −3Browse files

Unified · Split

18 files
  1. internal/misc/codex_instructions.go +1 −1
  2. internal/misc/codex_instructions/gpt_5_codex_prompt.md-002-c9505488a120299b339814d73f57817ee79e114f +0 −0
  3. internal/misc/codex_instructions/gpt_5_codex_prompt.md-003-f6a152848a09943089dcb9cb90de086e58008f2a +0 −0
  4. internal/misc/codex_instructions/gpt_5_codex_prompt.md-005-35c76ad47d0f6f134923026c9c80d1f2e9bbd83f +0 −0
  5. internal/misc/codex_instructions/gpt_5_codex_prompt.md-006-0ad1b0782b16bb5e91065da622b7c605d7d512e6 +0 −0
  6. internal/misc/codex_instructions/prompt.md-001-31d0d7a305305ad557035a2edcab60b6be5018d8 +0 −0
  7. internal/misc/codex_instructions/prompt.md-002-6ce0a5875bbde55a00df054e7f0bceba681cf44d +0 −0
  8. internal/misc/codex_instructions/prompt.md-003-a6139aa0035d19d794a3669d6196f9f32a8c8352 +0 −0
  9. internal/misc/codex_instructions/prompt.md-004-063083af157dcf57703462c07789c54695861dff +0 −0
  10. internal/misc/codex_instructions/prompt.md-005-d31e149cb1b4439f47393115d7a85b3c8ab8c90d +0 −0
  11. internal/misc/codex_instructions/prompt.md-006-81b148bda271615b37f7e04b3135e9d552df8111 +0 −0
  12. internal/misc/codex_instructions/prompt.md-008-30ee24521b79cdebc8bae084385550d86db7142a +0 −0
  13. internal/misc/codex_instructions/prompt.md-009-e4c275d615e6ba9dd0805fb2f4c73099201011a0 +0 −0
  14. internal/misc/codex_instructions/prompt.md-010-3d8bca7814824cab757a78d18cbdc93a40f1126f +0 −0
  15. internal/misc/codex_instructions/prompt.md-011-4ae45a6c8df62287d720385430d0458a0b2dc354 +0 −0
  16. internal/misc/codex_instructions/prompt.md-012-bef7ed0ccc563e61fac5bef811c6079d9d65ce60 +0 −0
  17. internal/misc/codex_instructions/prompt.md-013-b1c291e2bbca0706ec9b2888f358646e65a8f315 +0 −0
  18. internal/translator/codex/openai/responses/codex_openai-responses_request.go +1 −2
internal/misc/codex_instructions.go+1−1
@@ -20,7 +20,7 @@ func CodexInstructionsForModel(modelName, systemInstructions string) (bool, stri · 19 unmodified lines
20 // lastReviewPrompt := ""20 // lastReviewPrompt := ""
21 for _, entry := range entries {21 for _, entry := range entries {
22 content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name())22 content, _ := codexInstructionsDir.ReadFile("codex_instructions/" + entry.Name())
23 if systemInstructions == string(content) {23 if strings.HasPrefix(systemInstructions, string(content)) {
24 return true, ""24 return true, ""
25 }25 }
26 if strings.HasPrefix(entry.Name(), "gpt_5_codex_prompt.md") {26 if strings.HasPrefix(entry.Name(), "gpt_5_codex_prompt.md") {
internal/misc/codex_instructions/gpt_5_codex_prompt.md-002-c9505488a120299b339814d73f57817ee79e114frenamed from internal/misc/codex_instructions/gpt_5_codex_prompt.md-006-c9505488a120299b339814d73f57817ee79e114f+0−0

File renamed without changes.

internal/misc/codex_instructions/gpt_5_codex_prompt.md-003-f6a152848a09943089dcb9cb90de086e58008f2arenamed from internal/misc/codex_instructions/gpt_5_codex_prompt.md-005-f6a152848a09943089dcb9cb90de086e58008f2a+0−0

File renamed without changes.

internal/misc/codex_instructions/gpt_5_codex_prompt.md-005-35c76ad47d0f6f134923026c9c80d1f2e9bbd83frenamed from internal/misc/codex_instructions/gpt_5_codex_prompt.md-003-35c76ad47d0f6f134923026c9c80d1f2e9bbd83f+0−0

File renamed without changes.

internal/misc/codex_instructions/gpt_5_codex_prompt.md-006-0ad1b0782b16bb5e91065da622b7c605d7d512e6renamed from internal/misc/codex_instructions/gpt_5_codex_prompt.md-002-0ad1b0782b16bb5e91065da622b7c605d7d512e6+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-001-31d0d7a305305ad557035a2edcab60b6be5018d8renamed from internal/misc/codex_instructions/prompt.md-013-31d0d7a305305ad557035a2edcab60b6be5018d8+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-002-6ce0a5875bbde55a00df054e7f0bceba681cf44drenamed from internal/misc/codex_instructions/prompt.md-012-6ce0a5875bbde55a00df054e7f0bceba681cf44d+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-003-a6139aa0035d19d794a3669d6196f9f32a8c8352renamed from internal/misc/codex_instructions/prompt.md-011-a6139aa0035d19d794a3669d6196f9f32a8c8352+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-004-063083af157dcf57703462c07789c54695861dffrenamed from internal/misc/codex_instructions/prompt.md-010-063083af157dcf57703462c07789c54695861dff+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-005-d31e149cb1b4439f47393115d7a85b3c8ab8c90drenamed from internal/misc/codex_instructions/prompt.md-009-d31e149cb1b4439f47393115d7a85b3c8ab8c90d+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-006-81b148bda271615b37f7e04b3135e9d552df8111renamed from internal/misc/codex_instructions/prompt.md-008-81b148bda271615b37f7e04b3135e9d552df8111+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-008-30ee24521b79cdebc8bae084385550d86db7142arenamed from internal/misc/codex_instructions/prompt.md-006-30ee24521b79cdebc8bae084385550d86db7142a+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-009-e4c275d615e6ba9dd0805fb2f4c73099201011a0renamed from internal/misc/codex_instructions/prompt.md-005-e4c275d615e6ba9dd0805fb2f4c73099201011a0+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-010-3d8bca7814824cab757a78d18cbdc93a40f1126frenamed from internal/misc/codex_instructions/prompt.md-004-3d8bca7814824cab757a78d18cbdc93a40f1126f+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-011-4ae45a6c8df62287d720385430d0458a0b2dc354renamed from internal/misc/codex_instructions/prompt.md-003-4ae45a6c8df62287d720385430d0458a0b2dc354+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-012-bef7ed0ccc563e61fac5bef811c6079d9d65ce60renamed from internal/misc/codex_instructions/prompt.md-002-bef7ed0ccc563e61fac5bef811c6079d9d65ce60+0−0

File renamed without changes.

internal/misc/codex_instructions/prompt.md-013-b1c291e2bbca0706ec9b2888f358646e65a8f315renamed from internal/misc/codex_instructions/prompt.md-001-b1c291e2bbca0706ec9b2888f358646e65a8f315+0−0

File renamed without changes.

internal/translator/codex/openai/responses/codex_openai-responses_request.go+1−2
@@ -6,7 +6,6 @@ import ( · 5 unmodified lines
6 "strings"6 "strings"
7 7
8 "github.com/router-for-me/CLIProxyAPI/v6/internal/misc"8 "github.com/router-for-me/CLIProxyAPI/v6/internal/misc"
9 log "github.com/sirupsen/logrus"
10 "github.com/tidwall/gjson"9 "github.com/tidwall/gjson"
11 "github.com/tidwall/sjson"10 "github.com/tidwall/sjson"
12)11)
@@ -74,7 +73,7 @@ func ConvertOpenAIResponsesRequestToCodex(modelName string, inputRawJSON []byte, · 61 unmodified lines
74 if hasOfficialInstructions {73 if hasOfficialInstructions {
75 return rawJSON74 return rawJSON
76 }75 }
77 log.Debugf("instructions not matched, %s\n", originalInstructions)76 // log.Debugf("instructions not matched, %s\n", originalInstructions)
78 77
79 if len(inputResults) > 0 {78 if len(inputResults) > 0 {
80 newInput := "[]"79 newInput := "[]"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t