fix: pass model parameter to Claude and Codex SDKs

Previously, the model parameter was accepted by the /api/agent endpoint
and extracted from requests, but was never passed through to the Claude
SDK or Codex SDK, causing all requests to use default models regardless
of user selection.

Changes:
- Add model parameter to queryClaudeSDK() options in routes/agent.js
- Add model to threadOptions in openai-codex.js
- Remove unused /cost slash command and PRICING constants
- Centralize all model definitions in shared/modelConstants.js
- Update API documentation to dynamically load models from constants
This commit is contained in:
simosmik
2025-12-29 16:19:09 +00:00
parent d98b112302
commit 60c8bda755
8 changed files with 134 additions and 111 deletions

View File

@@ -213,7 +213,8 @@ export async function queryCodex(command, options = {}, ws) {
workingDirectory,
skipGitRepoCheck: true,
sandboxMode,
approvalPolicy
approvalPolicy,
model
};
// Start or resume thread