I had a nice simple api that used dot structures only like
something = something.something
something.something = something
I asked the agent to add some functionality to that api and explicitly told it NOT to change the api style explaining things as above.
It changed the whole api anyway to use functions and complicated structures instead.
PS:
You really need to make the model better adhere to specific user instructions