Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why don't AI coding tools like REST?
16 points by sshadmand 1 day ago | hide | past | favorite | 5 comments
Is it just me, or do AI coding tools tend to generate RPC-style endpoints and POST methods (even when GET is clearly all that is needed) instead of following RESTful conventions?

Given how advanced these models are, I'm wondering if this is intentional. Is AI saying it has determined that strict REST isn’t a practical standard all around? Or is it just a byproduct of token efficiency or....?

I know I can steer the output with better prompting, but I'm curious whether there's a real underlying reason for this almost all-the-time output.

 help



REST APIs are deceptively simple on the surface but notoriously inconsistent in practice — different teams implement auth, pagination, and error handling completely differently. AI tools struggle because there's no single 'correct' REST — every API is its own dialect. GraphQL and gRPC have stricter contracts which makes them easier for AI to reason about. The irony is that this inconsistency is also why REST APIs have so many security vulnerabilities — no standard means no standard security either.

What model are you using? I don't think I've encountered it before. But then again, as long as you explicitly instruct an AI to follow REST, it usually will.

REST is underspecified — every codebase does it differently. The model learned that POST-everything works everywhere, so it defaults to that. Adding a concrete example endpoint to your context works better than just saying "use REST."

I have been using VScode with GitHub AI assistant and I asked the AI many times to set up the REST API it did work

What model are you using?



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: