```typescript
import { toNumber } from 'lodash';

export function doseTotals(log: [string, string][]): Record<string, string> {
  return log.reduce((totals, [reagent, amount]) => {
    const parsedAmount = toNumber(amount);
    
    if (isNaN(parsedAmount)) {
      throw new Error(`Invalid amount: ${amount}`);
    }

    totals[reagent] = String(Math.round(parsedAmount * 1000) / 1000).replace(/\.?0*$/, '');
    
    return totals;
  }, {} as Record<string, string>);
}
```