Add Thinking Machines (Tinker) model provider support - #109
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Ash Bhat <ash.bhat@getathelas.com>
theashbhat
self-requested a review
July 16, 2026 15:59
Contributor
Author
Original prompt from Ash Bhat
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Thinking Machines' Tinker as a selectable inference provider, wired through the same "bring your own key" path as Fireworks/OpenAI/Anthropic. Users add their key + model checkpoint under Settings ▸ Keys and pick Thinking Machines in the model picker (iOS list + Mac menu, both data-driven so no picker-specific code was needed).
The Tinker OpenAI-compatible API differs from the other hosted providers in one important way: there is no fixed model list — the "model" is a user-specific sampler checkpoint path (
tinker://…/sampler_weights/…). So we store two values instead of one:THINKY_API_KEYandTHINKY_MODEL_PATH, and the model'sapiModelIDresolves from the stored path at request time.Endpoint (from the Tinker OpenAI-compatible docs):
https://tinker.thinkingmachines.dev/services/tinker-prod/oai/api/v1/chat/completions, Bearer auth, OpenAI-compatible wire format (soTinkerChatreusesOpenAIChat.wireMessagesexactly likeFireworksChat).Changes
KeyStore: newKey.thinky(THINKY_API_KEY) +Key.thinkyModelPath(THINKY_MODEL_PATH), newService.thinky("Thinking Machines") surfacing both keys in its editor; model path is treated as non-secret inmaskedPreview.ModelSelection: newModelProvider.thinkyandModelSelection.tinker.TinkerChat(new): streaming client mirroringFireworksChat; errors visibly when the key or model path is missing rather than silently falling back.AgentHarness: routes.thinky→TinkerChat.ModelPickerVC: footer copy for the Thinking Machines section.ConversationTitleService(adds a Tinker title path, only used when Tinker is the selected provider and both values are set),VisionSummaryService(grouped with.apple→ OCR fallback, since Tinker is text-only),VMAgentRuntime(.thinkyfalls through — the Loop VM runner can't target Tinker's custom base URL), andIntegrationSkillkey-alias map.ContextUsageTests:.tinkerjoins.appleFoundationas a model with an intentionally-nil context window.Secrets.xcconfig.example: documents the two new build-time vars.Onboarding was intentionally left out of scope — its simple single-key paste-chip flow doesn't fit Tinker's key + checkpoint-path requirement; Tinker is added via Settings ▸ Keys instead.
Testing
Not build-verified: this is a Swift/Xcode iOS+macOS app and the working environment has no macOS toolchain (
swiftc/xcodebuildunavailable). Verified instead by auditing that every exhaustiveswitchoverModelProvider/ModelSelectionnow handles the new cases.Link to Devin session: https://app.devin.ai/sessions/a2cdd7f461b1428ebbd7d589308818d5
Requested by: @theashbhat