Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Fix effort and provider handling in thread turn start
Julius Marmingefeff86638ef7
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex 3d5975578..e75f6f579 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -2153,13 +2153,7 @@ export default function ChatView({ threadId }: ChatViewProps) {}}const title = truncateTitle(titleSeed);- let threadCreateModel = selectedModel;- if (!threadCreateModel) {- threadCreateModel = activeProject.model;- }- if (!threadCreateModel) {- threadCreateModel = DEFAULT_MODEL;- }+ let threadCreateModel: ModelSlug = selectedModel || (activeProject.model as ModelSlug) || DEFAULT_MODEL;if (isLocalDraftThread) {await api.orchestration.dispatchCommand({@@ -2228,7 +2222,7 @@ export default function ChatView({ threadId }: ChatViewProps) {},model: selectedModel || undefined,provider: selectedProvider,- ...(supportsReasoningEffort ? { effort: selectedEffort } : {}),+ ...(supportsReasoningEffort && selectedEffort ? { effort: selectedEffort } : {}),assistantDeliveryMode: settings.enableAssistantStreaming ? "streaming" : "buffered",approvalPolicy,sandboxMode,@@ -2387,7 +2381,7 @@ export default function ChatView({ threadId }: ChatViewProps) {);const onEffortSelect = useCallback((effort: CodexReasoningEffort) => {- setSelectedEffort(effort);+ setComposerDraftEffort(threadId, effort);scheduleComposerFocus();},[scheduleComposerFocus, setComposerDraftEffort, threadId],@@ -2850,11 +2844,13 @@ export default function ChatView({ threadId }: ChatViewProps) {<Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" />{/* Reasoning effort */}- <ReasoningEffortPicker- effort={selectedEffort}- options={reasoningOptions}- onEffortChange={onEffortSelect}- />+ {selectedEffort != null && (+ <ReasoningEffortPicker+ effort={selectedEffort}+ options={reasoningOptions}+ onEffortChange={onEffortSelect}+ />+ )}</>) : null}diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.tsindex 07ae9f850..a807bac86 100644--- a/packages/contracts/src/orchestration.ts+++ b/packages/contracts/src/orchestration.ts@@ -348,6 +348,7 @@ export const ClientThreadTurnStartCommand = Schema.Struct({text: Schema.String,attachments: Schema.Array(UploadChatAttachment),}),+ provider: Schema.optional(ProviderKind),model: Schema.optional(TrimmedNonEmptyString),effort: Schema.optional(TrimmedNonEmptyString),assistantDeliveryMode: Schema.optional(AssistantDeliveryMode),