So as far as I understand, the base price of a villager is supposed to be always the same.
For enchanted items, this price is supposed to depend on the enchantment.
There is, however, still a random component to it, as 2 trades with the same enchanted item still can have different prices.
- Summon some villagers
- Provide a lectern workstation for them (since librarians only have a single enchantment on each book, it's easiest to reproduce with them).
- Do the above until you have 2 instances of the same trade and compare the prices.
→ The price may differ