Commit 5d302df
Fix token pricing precision by changing attributes from int to float (#46)
## Summary
Updates the TokenPricing model to use float data types instead of
integers for input and output token pricing attributes, enabling more
precise cost calculations.
## Key Changes
- Modified TokenPricing model attribute types from `int` to `float`
- Enhanced precision for token cost calculations
- Improved accuracy in pricing computations
## Impact
- **Breaking Change**: This change modifies the data model and may
affect existing integrations that expect integer values
- Applications consuming the TokenPricing model will now receive float
values instead of integers
- Database schema may require migration if persisting these values
## Testing Considerations
- Verify that all token pricing calculations work correctly with float
values
- Test backward compatibility with existing API consumers
- Validate precision improvements in cost computation scenarios
- Ensure proper handling of decimal values in pricing workflows
## Technical Notes
- The change affects the core pricing model used throughout the
robosystems client
- Consider updating any validation rules that may have assumed integer
constraints
- Review serialization/deserialization logic to ensure proper float
handling
---
🤖 Generated with [Claude Code](https://claude.ai/code)
**Branch Info:**
- Source: `bugfix/token-float`
- Target: `main`
- Type: bugfix
Co-Authored-By: Claude <noreply@anthropic.com>1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments