Back to /

Gemini + Aider chat

Google’s Gemini AI Developer API pricing is quite generous. Free tier’s limits are lower than the “paid tier” but still should be high enough for hobby projects. For example, the Gemini 2.0 Flash allows 15 requests and 1000000 tokens / minute and 1500 / day. Any Google user can generate an API key without any additional commitments.

Aider is an application that helps developers using LLM models in coding tasks. It can be used in chat mode, in which a developer gives instructions from the command line. Aider can also watch files in the project’s directory and apply commands that are specified in the edited file.

I decided to try to use Aider and LLM to build a Python application that displays the HTML form with an input field. When a user submits data, another endpoint takes value from the input field and checks it in the AWS DynamoDB database. If the value is not found, the application generates a presigned URL to the file that is stored in the AWS S3 bucket and sends it to users. Otherwise the application will display an error message.

I was able to achieve this goal using the Aider chat and the Gemini 2.0 Flash LLM model, but it required a lot of attention from my side. I had specific functional and non-functional requirements - when generated code didn’t match them I had to give detailed instructions how it should be rewritten. In that sense the whole process felt like programming in a natural language and gives an overall positive experience. In this experiment I was trying to use the Test Driven Development approach - define requirements as tests and ask LLM to generate the application from them which in my opinion is the optimal approach in work with LLM.

I didn’t feel a performance boost. Although I didn’t have to study FastAPI documentation or (almost) write any code by hand, I had to put a lot of effort in conversation with LLM, reviewing changes and navigating it in the right direction. In the best case scenario, an LLM can be as smart as an operator but not smarter. That’s why I don’t believe it can replace an engineer. For sure there is space for more experiments with more capable/expensive models or how requirements are defined.