Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

When generating workspace names with reasoning models (e.g., claude-opus-4-5), the API sometimes returns thinking content that breaks JSON parsing, causing 'Invalid JSON response' errors.

Fix: Explicitly pass providerOptions with thinking disabled to generateObject().

  • Add buildProviderOptions(modelString, 'off') to ensure no thinking content
  • Add ModelProvider interface for easier testing without full AIService
  • Add unit/integration tests for workspace title generation
  • Add testUtils.ts with minimal model creation for tests

Generated with mux

When generating workspace names with reasoning models (e.g., claude-opus-4-5),
the API sometimes returns thinking content that breaks JSON parsing, causing
'Invalid JSON response' errors.

Fix: Explicitly pass providerOptions with thinking disabled to generateObject().

- Add buildProviderOptions(modelString, 'off') to ensure no thinking content
- Add ModelProvider interface for easier testing without full AIService
- Add unit/integration tests for workspace title generation
- Add testUtils.ts with minimal model creation for tests
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

…tion

When workspace name generation fails (e.g., proxy returns invalid JSON):
- Fall back to placeholder name instead of blocking workspace creation
- Show warning toast with error details
- Log raw response body for debugging proxy issues

Also:
- Add warning toast type with theme-aware colors
- Explicitly disable extended thinking for generateObject calls
@ammario
Copy link
Member

ammario commented Dec 3, 2025

Not actually the problem

@ammario ammario closed this Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants