Spec Sheet Auto-Fill
In a vehicle's Spec sheet → Edit specs, clicking Look up data automatically searches the web for engine oil, gearbox and differential oil, brake fluid, coolant, wheel bolt torque, and tyre pressure.
Setup
Set both API keys in your configuration and restart torq:
TAVILY_API_KEY=tvly-… # https://app.tavily.com (free tier: 1,000 credits/month)
GEMINI_API_KEY=… # https://aistudio.google.com/apikey (free tier)
Without both keys, the button is disabled and shows which key is missing. Auto-fill populates fields shared by cars and motorcycles; motorcycle-specific fields (drivetrain, fork oil, valve clearance) must be entered manually.
When you run an auto-fill lookup, the vehicle's make, model, chassis code, year, and engine are sent to Tavily, and those fields plus HSN/TSN and the search results are sent to Google Gemini. Nothing else leaves your server.
How it works
- Trade names: Gemini identifies common trade names for the engine (for example
C 220 CDIfor anOM646in aW203). These are used solely as search terms. - Web search: torq runs four Tavily searches (engine oil, gearbox/differential, coolant/brakes, wheels/tyres). One lookup uses
8credits (~125 lookups/month on Tavily's free plan). - Extraction: Gemini extracts candidate values and cites the exact search result URL.
- Verification: torq validates every value against the raw source text before pre-filling the form.
Values without guessing
A value is kept only if its cited source is one of the search results and the exact value appears with its unit in that result's text (for example 6,5 Liter for 6.5 L or 110 Nm). Tyre pressure ranges such as 2.2–2.4 bar only count if written as a range in the source. Everything else stays blank.
The verification check guarantees that a number appears in the cited page — not that the website is authoritative or that the model picked the right row of a spec table. Always click the source badge and verify each value before saving, especially tyre pressures (which vary by tyre size and load).
Reviewing results in the dialog
- Filled fields display a source badge such as ⚡ Auto · carwiki.de ↗ that opens the source in a new tab.
- Also replace filled-in values controls whether existing values are overwritten (off by default, so only blank fields are filled).
- Editing a filled field marks it Adjusted manually; restoring the original value restores the source badge.
- Nothing is written to the database until you click Save; Cancel discards everything.
Troubleshooting
| Message | What to do |
|---|---|
Not set up on this server | Set both TAVILY_API_KEY and GEMINI_API_KEY and restart torq |
Gemini model is no longer available | Google retired the default model for new keys; set GEMINI_MODEL to a current model |
Gemini is overloaded right now | Google reported high demand; torq already retried twice — try again in a minute |
Gemini quota is used up | Free-tier daily limit reached; check ai.dev/rate-limit |
Tavily search credits are used up | Monthly quota exhausted; check app.tavily.com |
The lookup took more than 3 minutes | The configured GEMINI_MODEL responded too slowly; switch to a faster model |
Few or no values found | Fill in engine code, power, and model year in the vehicle profile to improve search queries |